Re: Could not load file or assembly 'App_Web...'
"Simpson, Nick" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <628CA89756065648B4DB6CC967D958B40A1495CB@london_mail.eu.ms> |
Wierd. Have just checked the KBID article below and it looks like it exactly describes the problem i get, much more so than it did in the past. Hmmmm. -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:[email protected]] On Behalf Of Mark Kucera Sent: 09 February 2007 19:16 To: [email protected] Subject: Re: [DOTNET-WEB] Could not load file or assembly 'App_Web...' We had this same problem. And it was always a real pain. The problem would always occur at the most inopportune times, and often we weren't able to recompile and deploy because it would be publishing code that wasn't finished yet. We actually figured out that you can basically stop the site, and go into the temporary asp.net files c:\windows\microsoft.net\framework\.... and delete the cache and then the site would come back up and work again for a couple days or hours. There was no logic to when it would die the next time. MS has a KB that is supposed to fix this error... http://support.microsoft.com/kb/915782/en-us however I had read on several forum posts about people who installed this and still experienced the problem afterwards. We installed this Hotfix and continued to experience the problem. Ironically I posted a message to this forum a couple months ago w/ this problem and 1 user wrote back to check your application and see if you might be referencing any 1.x assemblies in your 2.x application. Sure enough I had 1 1.1 assembly that was being referenced, and after I rewrote it into 2.0 (Thank You Reflector.exe) the problem went away and hasn't happened since. I'd urge you to take a look and see if that might be your problem as well. Good Luck! MK -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:[email protected]] On Behalf Of Simpson, Nick Sent: Friday, February 09, 2007 11:13 AM To: [email protected] Subject: Re: [DOTNET-WEB] Could not load file or assembly 'App_Web...' One error in my post. I installed Visual Studio 2005 SP1 not SP2. -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:[email protected]] On Behalf Of Simpson, Nick Sent: 09 February 2007 15:32 To: [email protected] Subject: [DOTNET-WEB] Could not load file or assembly 'App_Web...' Hi Guys, From time to time we get a fairly serious exception on our site along the lines of the following: "Could not load file or assembly 'App_Web_gvvevrsq, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." The consequences of this are that a great portion of our site simply throws this exception (System.IO.FileNotFoundException) and ceases to function - bad! The fix for this is to recompile the application - a real pain in the butt if it happens at midnight. Also - although loads of posts out there happily suggest different ways of achieving a fix once the problem happens, practically none of them are any good on how to stop it ever happening in the first place. Links to a few of these posts follow: http://forums.asp.net/thread/1230276.aspx http://forums.asp.net/thread/1271201.aspx Should give you some idea of the sort of confusion that exists out there on this. One of the solutions suggested out there was to install Visual Studio 2005 SP2. I have done so. No fix. The problem still occurs. The circumstances under which this problem occurs in my particular case are: - A non-precompiled release build with pdbs is built to our server. - Once the app is running we need to update an aspx or ascx file so we copy this to our server. - We then sometimes get a "could not load type exception". - We take our app off load balancing so no users are on it anymore. - We recycle the app to try and clear this but then the "Could not load file or assembly.." problem happens. Any ideas? Some people out there have suggested that this only happens for pages that use master pages with nested user controls. Our site does this so could be a pointer. However my most recent thoughts have turned to getting a better understanding of the compilation model in ASP.NET 2.0 and seeing if a pre-compiled no-pdb release build works via the publish function in VS.NET 2005. Maybe this problem never happens during a pre-compiled build. I read the following article to help me understand the new compilation model. Any other articles out there? http://odetocode.com/Blogs/scott/archive/2005/11/15/2464.aspx But i'm not quite yet at understanding how to stop this ever happening again. Any ideas? Nick =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com