Yesteday I had a very strange behavior. I had to build an installer package to update a web application in a customer site, but got crazy trying to have it installed correctly.
The application installed fine, but as soon as I tried to browse it, a strange error appeared on the EventViewer:
Type : System.ArgumentOutOfRangeException, mscorlib, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089
What was happening?
Well, it appears that there is a problem with assemblies compiled in the “future”. Obviously this means that if you’re deploying an application on another timezone you must the coherency of the date/time of your assemblies with the actual date/time of that server.
In fact, IIS looks for the date/time of your assemblies, and if the date/time of your assemblies is on the future compared with the local date/time then it crashes with the exception above.
Hope this helps someone else having this issue.