Deploying Asp.Net to a different time zone, Temporal Future Shock! Specified argument was out of the range of valid values. Parameter name: utcDate

by Jon 17. December 2010 09:57

You would have never of thought it but if you compile ASP.NET in a different timezone you could cause yourself some temporal problems.  I recently discovered that parts of ASP.NET are date specific and if you compile an ASP.NET application in one timezone (The UK), and deploy to another timezone (California) you may find that your web application won’t work correctly until the time catches up.  Its all to do with the date stamp in the assemblies, when you install your application onto a server in california the timestamps on the assembly files may be in the future and parts of the ASP.NET framework will refuse to load them.  Just by waiting 8 hours for time to catch up the problem will resolve itself!  Its defiantly worth saying this doesn’t effect all server setups I had no problems with a customer running server 2008 in a different timezone, I only came across this problem with an AJAX enabled system when a customer was running server 2003, but I haven’t had time to test different scenarios

I installed the application the AJAX was ‘working’ however nothing was styling correctly

I viewed the source of the page and started debugging by copying the WebResource.xsd url into different tab, I was surprised to see the following error:

Server Error in '/' Application.

Specified argument was out of the range of valid values.
Parameter name: utcDate

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: utcDate
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

I returned to the system after 8 hours and the site was working and the error was gone! Be careful out there, this was a fully patched server 2003!

Tags: , , , , , , ,

asp.net | Deploy | development | General | IIS | Maintanance | TechSupport | vs2010


TeamCity via IIS on port 80, using a reverse proxy, Part 2 host filtering so you can access Teamcity and other sites in IIS at the same time

by Jon 30. October 2010 23:29

If you followed my previous post how to setup ARR Routing to set up a reverse Proxy top access TeamCity over IIS 7.5 it will work perfectly and you will be able to access TeamCity on a different port.  However…. if you create a website under IIS on the same server you wont be able to access it because the reverse proxy is forwarding every site to TeamCity!  This might work for you but its not ideal if you want to run other IIS sites on the same server, the following steps will take you through setting up a condition so only url you specify will take you to TeamCity.

  1. Open up the Server Farm you just Created, and double click on Routing Rules
  2. Click on Url Rewrite
  3. Select the first Inbound Route and Press Edit
  4. Press the Add.. Button in the conditions pane
  5. Type {HTTP_HOST} into the condition input
  6. Ender the domain you want to want to forward into the pattern, all other domains will be passed to IIS normally
  7. Press Ok
  8. Press Apply and your done

Click on Routing RulesClick on Url Rewrite

Edit the Existing RuleSpecify the Host you want to Filter By

Tags: , , ,

Continuous Integration | development | IIS | TeamCity.Net


500.19 Internal Server Error, There is a duplicate ‘system.web.extensions /scripting /scriptResourceHandler’

by Jon 29. October 2010 22:22

Http Error 500.19 There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’

After shipping your asp.net 2.0, 3.0 or 3.5 application to a new server you get the following error:

There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’

Don’t worry you haven’t done anything wrong, your are just trying to ship to a new server that has been configured to use .NET 4.0 as the default, and lucky for you it is a quick and simple configuration change to fix it:

Change Application Pool to .Net Framework v2.0

  • Open Internet Information Services (IIS) Manager
  • Goto the Application Pools screen
  • Open the Application Pool offending web application(s) are using
  • Change the Application Pool to use dotnet 2.0 instead of .net 4.0
  • Hard Refresh the erroring page with a <Ctrl> F5

Tags: , , , , , , , ,

asp.net | Deploy | IIS | TechSupport


TeamCity via IIS on port 80, using a reverse proxy in IIS7, 30 second job, Part 1

by Jon 23. October 2010 06:55

So you have your TeamCity system, but annoyingly if you already have IIS on the server your TeamCity probably won’t be accessible on standard web port.  Wouldn’t it be nice to be able to host or access TeamCity via IIS 7.5 via one firewall rule, and get access to TeamCity from any coffee shop or site with restricted internet in the world?  Its much easier than you think in IIS 7.5, a real 30 second job to get it working using Application Request Routing (which is normally used to load balance webfarms) to setup a reverse proxy.

1. Download and Install Application Request Routing for IISS (2.0), using the web platform installer

Web Platform Installer

2. Start Internet Information Services Manager (IIS Manager).  Left Click on the Server Name Node to bring up the server configuration in the right pan and double click on Application Request Routing in the IIS Section.

 Click On Application Requestion Routing 

3. A Server Farms Node will Appear in the left hand side treeview, right click on the node and select Create Server Farm.  Give your new server Farm/reverse proxy a name

Enter a Name for TeamCity Server Farm

4. Press Next, enter localhost or your TeamCity server name, press advanced and change the port to the port that your TeamCity currently runs under.

Expand Advanced Settings, and Enter the port that TeamCity is running under

5. Press Finish, and press yes when prompted if you want the rewrite rules written for you.

Allow IIS to automatically rewrite the URLs

6. Finally navigate to your TeamCity Installation using a port free url go to administration->Server Configuration and remove the port from the Server Url and your done.

7. If you want to run other websites on this IIS Server you will need to continue onto Part 2- setup filtering so only specific hosts are forwarded onto TeamCity.

Tags: , , ,

Continuous Integration | development | IIS | TeamCity.Net


Where is WebDeploy aka MsDeploy installed to

by Jon 30. June 2010 11:54

Microsoft has a funky tool that atomates the deployment of web appplications.  It has a GUI interface and importantly a command line interface.  It isn't obvious where it is installed to, and microsoft have a naming issue (it is called webdeploy but the exe is called msdeploy)!  The folder msdeploy/webdeploy is installed to is here, enjoy

C:\Program Files\IIS\Microsoft Web Deploy

MSDN documentation is here

A Basics Blog here, but it is a little confusing

A sample Manifest.xml

Turns out its actually quite simple to do, the docs are over complicated.  All you need to go is create a blank zip file and Create a new xmlfile called Manifest.xml inside it and a directory for content.  When I finally have it working I will put together a easy step by step blog post.  Got a few things in the pipeline at the moment.

Tags: , , ,


Powered by BlogEngine.NET
Original Design by Laptop Geek, Adapted by onesoft, and finally some tiny tweaks by JonAlb