.NET Framework 2.0 SP1 causes application to fail on references

W

wardy

Hi all,

I have a web application deployed in a Production environment, where
it has happily been running for the past 2 years on the .NET 2.0
framework. However, the operations team recently installed the .NET
2.0 Framework SP 1 on the server, and immediately certain sections of
the web site began failing with the errors "Could not load file or
assembly 'blah' or one of its dependencies. The system cannot find
the file specified".

I am wondering if others have experienced this issue and/or know why
the installation of the patch has started causing my application to
have problems. When we uninstalled the patch the site began working
as normal again - is my web.config file misconfigured with references
I don't need and may not exist on the server (I didn't add these
particular references, the framework did when I compiled), and the
patch now causes the framework to behave differently in validating
references??

Thanks
 
C

Cowboy \(Gregory A. Beamer\)

First, let's make sure I cover two different scenarios:

1. Added .NET 3.x to server

In this case, you may have one of the rare instances where 2.0 assemblies
will not run properly on 3.5. If this is the case, you may have to recompile
the site for 3.5.

Aiming at 2.0 might also be a solution, but since 3.5 is set on top of 2.0,
I am not sure, and have not tested. It makes sense, but I hate to give false
hope when I am a bit clueless on the topic at hand.

2. Just update to SP

Most likely JITTed files are hosed. If so, follow these steps:

Stop IIS and empty out the directory

{WIN_DIR}\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

where {WIN_DIR} is normally C:\Windows

You cannot empty this while the web server is running, as the running
site(s) lock the files. Once done, the dependencies should be rejitted and
you should be fine. If that does not work, put the site(s) in new
folder(s) -- copy not move -- and rebuild the site definitions in IIS.


NOTE:
This, to me, is a bug in the way Temporary ASP.NET files are used, but I am
not sure it can be designed around. It is present any time you alter files
that you have dependencies to. I have not, personally, seen it when applying
a .NET Service pack, but it does happen if someone restructures files (read
my next blog entry -- some time today).
 
W

wardy

Hi Gregory,

Thanks for the information....to clarify all I was doing was
installing the SP1 patch for .NET 2.0 for an existing 2.0 install. It
is interesting that the temporary files could be the issue - I never
thought to go down that path of debugging. In the interim while
trying to figure out the "why", we did get around the problem by
simply commenting out the offending references in the web.config files
as the application does not use them directly so they are not
necessarily required (it references to the "stdole" object that is
causing the grief).

Strangely I had assumed that a server reboot would clear out the
temporary .NET files, but now that I think down that path they are
never cleared on my development machine when I reboot, so the server
reboot after the install would not have remedied this problem either.

I will try your suggestion of deleting the temporary .NET files on the
server and seeing if that fixes the issue and I'll let you know how I
make out with it.

Thanks
 
W

wardy

Well, I attempted the temporary .NET file deletion, and it hasn't had
any effect as I still get the same error.

I didn't quite understand your approach for "If that does not work,
put the site(s) in new
folder(s) -- copy not move -- and rebuild the site definitions in
IIS". Are you saying to put the site in a new virtual directory? Or
are you talking about moving the site files from one physical folder
to another? And I'm not sure what you mean by rebuilding the site
definitions in IIS....is that something that I have to do?

P.S. While I was on the server, I noticed that the .NET 3.0 framework
has been installed, though it is on both servers so I don't think it's
the issue unless somehow it interacts strangely with the 2.0 SP1
release, because the server without the 2.0 SP1 release works fine
with the 3.0 on there...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top