Monday, June 23, 2014

IIS Could not load file or assembly 'App_Web_..., Version=


Could not load file or assembly 'App_Web_..., Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.


Opening an ASP.NET page on a IIS web server.


An unhandled exception occurred during the execution of the current web request. Precisely a System.IO.FileNotFoundException. This error may happen when the website is trying to load a custom web control that is displayed as needed. When the framework try to compile it, appends a random string at the end of the assemby. If another control referes to this one, at compile time the name of the newly compiled file and the previous version of the file cause a file name mismatch and therefore the parent control is looking for a file that no longer exists.


Setting the batch property of the compilation tag to false in the web.config file:

<compilation debug="false" batch="false" />