I have an asp.net site that is using version 1.1 of the .NET framework. Occasionally, the site will begin crashing with an object null error and bring up an error screen that reports the .NET version as 2.0. If I recycle the site app pool, then the site will come back up and run normally until it crashes again a week or two later. If I manually change the .NET version to 2.0, then I get the same object null error.
Has anyone seen a problem like this before or know how to fix it?
Hmm – Scott Hanselman had an issue similar to this – it turned out that requests to non-.NET resources that are made after the application had timed out in IIS and been unloaded could cause it to start in 2.0 mode.
Adding the <supportedRuntime> element to the web.config resolved the issue: