by matt
17. March 2009 11:05
This was not the first time I've seen this error message in a web application. Usually it happens on the development box and a quick re-compile gets rid of it quite easily.
I had it today an a staging box, so re-compile is not an option. Looking at the fairly obviously generated file name, it's clear that this file is part of the ASP.Net compilation process, so that was the general area to look for a solution.
After a brief read about the Compilation Element in the web.config file on the MSDN library, I made a brief edit to my web.config so that the batch attribute is set to FALSE. This makes ASP.Net compile stuff as and when it needs it, rather than trying to compile everything when the application starts. So now my web.config contains the following:
<configuration>
<system.web>
<compilation defaultLanguage="c#" debug="false" batch="false">
...
</compilation>
...
</system.web>
...
</configuration>
It looks like for some reason the compiler was getting confused while trying to compile the entire site. Changing this setting makes it compile things when theya re first required and seems to get rid of the error.
I've not managed to find a better solution or explanation from Microsoft about the issue, but it's gone away and that makes me happy.