Re: Could not load file or assembly 'App_Web...'

"Simpson, Nick" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <628CA89756065648B4DB6CC967D958B40A14956F@london_mail.eu.ms>
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(r)  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.