473,503 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IIS locks DLLs after deploying web site.

I do not know why this happen, and it does not happen ALL the time, but
it does happen on a fairly regular basis, and when it does, it causes
real problems. If anyone can tell me
how to prevent this, and moreover, how to FIX it, without having to
bounce
IIS, I would REALLY appreciate it! This problem is occurring on IIS
Advanced Server 2003. Have not tested this on Server 2000. I am
guessing the same.

The Problem:

We deploy a work version of a .NET 2.0 web application. It works and
everything is okay. But then sudden, IIS / worker process fails to
load an assembly.

This is the error:
Could not load file or assembly '{My Assembly Name},
Version=1.0.0.20906, Culture=neutral, PublicKeyToken=null' or one of
its dependencies. Access is denied.

The file is stuck by IIS. I have tried to recycle the application pool
and that does not work. The only solution I have found so far is to
restart IIS and update the Assembly in the bin folder in order to force
a recompile. Please keep in mind I can update any of the other
Assemblies in the bin folder without any problem, it is only this one
file I can not update, thought restarting IIS. When I try, I get this
error ".....cannot access the file {My Assembly Name} because it is
being used by another process."

There is one thing that I have noticed: there is code where this
problematic assembly is being used / accessed using reflection. Now,
there are other assemblies also being accessed by reflection, but this
one so far has been the problem child. I tried FileMon to see who
might have the file locked and so far it has been the workerprocess
(w3wp.exe). I also seen others having this problem, but not real
solutions. I am at a loss.

Here is some of my research:
1.
http://groups.google.com/group/micro...8c7e0fcb2eb3f4
2.
http://www.velocityreviews.com/forum...aspnet-20.html
3. http://www.codecomments.com/archive2...12-715366.html
4. http://www.eggheadcafe.com/forums/Fo...=60661&INTID=7

How can I prevent this from happening in the first place? Any
thoughts? Thanks for your time.

Aug 2 '06 #1
1 3158
I am replying to my post, in order to share my finding. I think I have
find solution.

Thanks this post http://forums.asp.net/thread/1277349.aspx. THANKS
streelz!!

I was having this problem and found the following solution to work:

1. In IIS, click on web service extensions
2, Add a new web service extension (WSE)
3. Name the WSE "ASP.NET 2.0", or whatever you deem appropriate for
your enterprise
4. Add X:\your .net install path\framework\v2.0.50727\aspnet_isapi.dll
-- Install path is c:\windows\microsoft.net by default
5. Click OK, and set the WSE to "Allowed"
6. (optional) create a new application pool for your application
7. Right click your application and go to properties
8. On the ASP.NET tab, change the asp.net version to 2.0
9. Navigate to your x:\.net install path\framework\v2.0.50727 folder
10. Grant write/modify access to the"Temporary ASP.NET Files" folder
for your web user (IUSR, etc.)

I hope that helps others that are having this problem. MSFT should be
aware of this possible problem with ASP and .NET 2.0. I still think it
is a reflection related issue, but that is different topic. I will be
investigating that as-well to see how one can tell the worker process
to stop looking in the Temporary ASP.NET Files and looking for the dll
in the bin folder.

You can read another post which I have added additional comments.
http://forums.microsoft.com/MSDN/Sho...iteID=1&mode=1

I hope this helps people solve this VERY frustrating problem.

br*******@gmail.com wrote:
I do not know why this happen, and it does not happen ALL the time, but
it does happen on a fairly regular basis, and when it does, it causes
real problems. If anyone can tell me
how to prevent this, and moreover, how to FIX it, without having to
bounce
IIS, I would REALLY appreciate it! This problem is occurring on IIS
Advanced Server 2003. Have not tested this on Server 2000. I am
guessing the same.

The Problem:

We deploy a work version of a .NET 2.0 web application. It works and
everything is okay. But then sudden, IIS / worker process fails to
load an assembly.

This is the error:
Could not load file or assembly '{My Assembly Name},
Version=1.0.0.20906, Culture=neutral, PublicKeyToken=null' or one of
its dependencies. Access is denied.

The file is stuck by IIS. I have tried to recycle the application pool
and that does not work. The only solution I have found so far is to
restart IIS and update the Assembly in the bin folder in order to force
a recompile. Please keep in mind I can update any of the other
Assemblies in the bin folder without any problem, it is only this one
file I can not update, thought restarting IIS. When I try, I get this
error ".....cannot access the file {My Assembly Name} because it is
being used by another process."

There is one thing that I have noticed: there is code where this
problematic assembly is being used / accessed using reflection. Now,
there are other assemblies also being accessed by reflection, but this
one so far has been the problem child. I tried FileMon to see who
might have the file locked and so far it has been the workerprocess
(w3wp.exe). I also seen others having this problem, but not real
solutions. I am at a loss.

Here is some of my research:
1.
http://groups.google.com/group/micro...8c7e0fcb2eb3f4
2.
http://www.velocityreviews.com/forum...aspnet-20.html
3. http://www.codecomments.com/archive2...12-715366.html
4. http://www.eggheadcafe.com/forums/Fo...=60661&INTID=7

How can I prevent this from happening in the first place? Any
thoughts? Thanks for your time.
Aug 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4091
by: ack | last post by:
Hii all, I have a this internal use portal i am working on deployed on a server. My app uses some dlls that are instantiated from the asp pages using server.createobject Now I want to deploy...
0
1241
by: Corvettious | last post by:
I have been deploying my ../Bin/*.dlls with no problem until finally I tried to deploy the latest and the FTP site will not longer allow me to upload a certain DLL.... So I thought, fine I will do...
8
1398
by: Jan | last post by:
We have a VB dll that invokes a C# dll. The C# dll references 3 other dlls - one is a .NET dll, the other two are win32 COM dlls. I have a script that invokes the VB dll which in turn...
2
3531
by: fig000 | last post by:
Hi everyone, I recently wrote a vb.net app which includes some crystal reports. The user has very little money in their budget and have been without a working application for quite a while. This...
2
1179
by: WebMatrix | last post by:
Hello, Just created my first ASP.NET 2.0 project with Visual Studio 2005. I see they changed some very important things. So, I have the follwoing questions: 1. How can I view and remove...
0
1103
by: cj_trap | last post by:
Hi I have a small app which needs to be able to send out email (via outlook) under certain conditions. I've got it working perfectly on my PC, but I'm not sure how to deploy it. The...
0
1395
by: Dave | last post by:
Hello The application I'm building an installer for uses dlls which were developed originally in C. Since the application itself is developed in C#, these dlls were wrapped using SWIG....
10
1900
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I usually deploy my ASP .NET application to the server by publishing, using Visual Studio 2005 publish feature. This creates the Bin folder on the server, with the compiled DLLs. I've...
6
2410
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
Using Visual Studio 2005, I have created 4 small DLLs that our company projects can use to access common tools included in each of the separate DLL files. Our Visual Studio 2005 applications...
0
1085
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've created some DLLs for our projects, and I would like each project to access the same DLLs. In my Setup and Deployment project, after I add the primary output, I can easily add the dependant...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.