Recently, while working with MOSS 2007 on my VM I noticed that most of my pages, including Central Administration pages was throwing Javascript error. I did a lot of random things to fix, but realized very soon that fixing an issue should always be a focused and thoughtful process. Troubleshooting in the dark wasn't taking me anywhere, so this was the thought process that bailed me out.
Step 1> Since it is a Javascript error, let's isolate and ensure that it is a problem with 1 site, or all the sites. In my case, it happened to be all the sites. Conclusion > Something wrong with the Javascript. Let's try clearing IE cache and recheck. Okay, still doesn't work. Where does this JavaScript come from… ? Let's track that!
Step 2> Run Fiddler and see if the WebResource.axd is happy [along with other .js file requests]. Apparently the response code in my case was 200 ?!?
When I selected the entry for WebResource.axd, I found that the server has simply thrown the custom error, but the error code was eaten away [hence, the HTTP Response code was 200]. Conclusion > Something wrong with the server!
Step 3> Make the following changes in web.config of any SharePoint application that is throwing this error.
<configuration>
<SharePoint>
<SafeMode CallStack="true" />
</SharePoint>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>
Step 4> Reproduce the error. In my case, it was the following error that came out. Conclusion > Error code 500 and the description will show exactly what needs to be done. A little research, and I am all set. Seems like a time synchronization issue. Changed my VM Time, and browsed again. Voila!
ERROR>
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) +2816706
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +1939
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Hope this helps,
Rahul
Quote of the day: Art is science made clear. - Jean Cocteau