It seems that I discovered an annoying bug in the AJAX engine: if you have a JavaScript file of script control, which is loaded through the WebResource.axd and the DLL module that embeds this JavaScript file has a file creation date, which is in the future relatively to the current machine date – you would get an unhandled ArgumentOutOfRangeException exception, raising from System.Web.HttpApplication.ExecuteStep:
This would cause JavaScript error "Type NNN is undefined or null" in your browser. The simple resolution for this problem is to "touch" the affected DLL to update it's date to current machine date time: copy /y nul tt.txt |
Sunday, June 15, 2008
ArgumentOutOfRangeException at HttpCachePolicy.UtcSetLastModified if assembly file with script control has future date relatively to the machine date
Subscribe to:
Post Comments (Atom)
4 comments:
Thanks Alex, I had this issue also, found the exception details in Event Viewer. A search for 'ArgumentOutOfRangeException System.Web.HttpCachePolicy' brought up your blog entry and a solution to the issue!
Thanks, helped us as well!
If the time on the web server was set way off it can also cause this issue.
I was getting this error because the server thought it was 2006.
We use virtual machines for some tasks and if the date goes wonky...
http://www.experts-exchange.com/Software/VMWare/Q_23696749.html
...it can cause this error, for example if assemblies are built on a VM with a future-date and deployed to a different VM with a past date.
Post a Comment