Friday, February 6, 2009

Problem of deployment on server in defferent from build server timezone.

We have a problem with deploying our applications with the 3d pary components and we have to wait until the time zone that we have deployed to has caught up with our time. Here is the error from event log. 

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 2/5/2009 11:42:03 AM

Event time (UTC): 2/5/2009 4:42:03 PM

Event ID: 970fd57dcb5f437798becc86cd174f63

Event sequence: 29

Event occurrence: 1

Event detail code: 0

 

Application information:

    Application domain: /LM/W3SVC/1/Root/vrportal-1-128783256796462458

    Trust level: Full

    Application Virtual Path: /vrportal

    Application Path: E:\Projects\VRPortal\

    Machine name: VANTAGE-10

 

Process information:

    Process ID: 2252

    Process name: w3wp.exe

    Account name: NT AUTHORITY\NETWORK SERVICE

 

Exception information:

    Exception type: ArgumentOutOfRangeException

    Exception message: Specified argument was out of the range of valid values.

Parameter name: utcDate

 

Request information:

    Request URL: http://localhost/vrportal/ScriptResource.axd?d=mr0xEXwm4fB6qSpBbCAzEQtT2tQdIJlxmtQ7qsTv4PAC5lPm9sh5R-nSwNQXSYHRKBB5ZKiZkDdBaFTUH1RKu_tjXHdPXfOj0qU7ZOEKXPHosiT2h4zjxkSO5-poWk760&t=633694545000000000

    Request path: /vrportal/ScriptResource.axd

    User host address: 127.0.0.1

    User: 

    Is authenticated: False

    Authentication Type: 

    Thread account name: NT AUTHORITY\NETWORK SERVICE

 

Thread information:

    Thread ID: 1

    Thread account name: NT AUTHORITY\NETWORK SERVICE

    Is impersonating: False

    Stack trace:    at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)

   at System.Web.HttpCachePolicy.SetLastModified(DateTime date)

   at System.Web.Handlers.ScriptResourceHandler.PrepareResponseCache(HttpResponse response, Assembly assembly)

   at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context)

   at System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

 

Custom event details:

 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

 

Due the difference in timezones between our build server and deployment server in customer network the build has file modification date that lies in future for customer timezone.

 

File modification time is sent to client as Last-Modified HTTP header and file is cached in user cache with this time. Then requesting file at second time - browser  use date from cache and set If-Modified-Since: conditional get header in HTTP request expecting to receive 302 Not Modified response or content of new file.

 

Here is a problem. Once user will receive file with incorrect date (in future) - If-Modified-Since requests will be unable to detect if file was changed and use stale data.

This is a reason why Microsoft throws an exception in this situation. This is absolutely legit reason for this.

 

Here is the link on microsoft site: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=103158

0 comments: