Sunday, November 6, 2011

ASP.NET projet will not start due to daylight savings time

On saturday november 7 around 1:30 AM, I was working on HTML5 development using Visual Studio and a regular ASP.NET project.

Out of the blue the application refuse to start (using Cassini) and I get this error message


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.

Stack Trace: 


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: utcDate]
   System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) +3192626
   System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath) +1130
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +347
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8920324
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225



After a little bit of google, I concluded it was about some .NET assembly which had a problem with their timestamp. Since I know we were switching daylight savings time,
I was pretty sure that rebooting the machine will do it.

Well No. may be I should have waited until 02:00 AM the official time change.

So I set the time on my Windows to one hours back and then every thing works.

Conclusion
Dealing with Time zones and day light time saving is always a B-ATCH.

No comments:

Post a Comment