Pregunta

When we set the local time of a pc to a month in the past we get one or more WebResource.axd errors in chrome console:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:64052/WebResource.axd?d=Cjzj7jVTY4EPdSq5mvGjoSrxnLXMy3QfSg…KKG_LUt-hCit6C6aGtLnP8Fyeauwxri1mHWA2&t=635010758504375000&_=1362893669293

We also get a corresponding error in the event log:

URL: http://localhost:64052/WebResource.axd?d=uP9nGy6M3n_JdoEveOzmj96yg4ABiXKJAdqhkVRgVBsWd3gL5y7_K1_XWTQiJgcc8SBHZa93bfpldXjV9aPWUerfEFbhpKKC9spP0hhLnaliKvPWoHVXRzkiP3HsyBkV6i4cq3odGmq7L2OSDuFokuAHjYKYaS-AYoezs0raVsyEKQp9gYS_rkUnPMssEChEGrQLareZzDiKt9RKyN7I-A2&t=635010758504375000?version=4914; FilePath: /WebResource.axd: System.Web.HttpException (0x80004005): This is an invalid webresource request. 
at System.Web.Handlers.AssemblyResourceLoader.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)

The reason why we care about setting the local time of the PC to a month ago is because we are story testing a fix for a problem we had with the time springing ahead on March 10, 2013 and the invalid time interval associated with it.

We would like to understand the problem and why it could be occuring.

¿Fue útil?

Solución

One possible reason is that the embedded resource is from a DLL that has a file system modification date in the future. When ASP.NET handles the WebResource.axd request, it attempts to set the Last-Modified HTTP header to the modification date of the DLL. However, HttpCachePolicy.SetLastModified throws an exception if the date is later than the current system time.

Try to identify the DLL that contains the embedded resource, and reset its file system modification date to the current system time (or to a date in the past). To do this, you can start Command Prompt and use the following COPY command (as discussed by Raymond Chen):

COPY /B ABC.DLL +,,
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top