New hotfix for ASP.NET 2.0 (CS0006 & FileNotFoundException)


I recently worked with Jerry and Doug on a sporadic problem reported by a customer (Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found), and doing some researches I found they were already working on a fix for this problem (and a couple of other ones related to the same code area). I sent the private fix to the customer for testing in his real (non production!) environment, and after he confirmed the problem was solved without side effects, the Product Team went ahead and produced the final fix. Here are the error messages:



  • Exception message: Could not load file or assembly ‘<assembly>, Version=<version>, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified
  • Compiler Error Message: CS0006: Metadata file ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<path>\<assembly>.dll’ could not be found
  • System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again

Typically you get those errors when the application is running under high load (but that may not only be the only case), and the workaround to resolve the situation is to clear the Temporary ASP.NET Files folder and/or restart the application pool.


The KB article for this is still a draft (but I guess it should be published soon, I’ll link to it when available), but the fix you can request to CSS in case you need it, is 934839.


Update (30/3/2007):
The KB article as been published a couple of days ago, read it here.


 


Cheers


Comments (1)

  1. bret says:

    thank you for this post that google led me to.   i’m hoping it solves this problem we are experiencing…it’s intermittent and frustrating!!