473,657 Members | 2,535 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.2 0906, 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 ".....canno t 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 3172
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\aspn et_isapi.dll
-- Install path is c:\windows\micr osoft.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.2 0906, 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 ".....canno t 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
4092
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 the new versions of the web app on the same machine for testing thus making production and staging machines same, running the actual site as well as test site I have modified the dlls. So I want the old site to use old dll and new site to use newer...
0
1255
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 without it for now... Then a few days later it wouldn't accept another DLL.... Weird!!!! I am on a hosted (shared) environment with the latest .net installed and running (it has been working great!! :) before)
8
1405
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 successfully invokes the C# dll on my development machine. Next, I tried deploying to a stage server, but couldn't get the same test to work there. It seems the C# dll is not being invoked. I moved the C# dll and it's referenced .net and Interop dlls. ...
2
3552
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 being the case I worked with what was available: I used vb.net and crystal 8.5. The crystal reports are being viewed in the crystal report viewer which is still included in vb.net. I went ahead with developing this project because I found that...
2
1190
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 project references. I can add references from the project menu, but where is reference "folder" which used to be in VS 2003 from which I could add or remove references. 2. I see that there's no bin folder, project still compiles and runs, that's
0
1112
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 (apparently valid) assumption is that the user will have outlook installed and will be logged in as a valid outlook user. My project has 3 outlook-related dlls referenced - Interop.Microsoft.Office.Core.dll, Interop.Outlook.dll, and stdole.dll.
0
1410
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. Initially, the machine environment variables were set to enable code development; however, I am facing problem deploying the application. To work with these wrapped libraries, the application seems to access a specific dll, for instance, let's say the C...
10
1913
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 been asked to publish by copying the files manually instead. I stopped IIS for the application, deleted the application files and subfolders from the server, copied the files and folders from my local PC's project,
6
2420
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 call the DLLs and run them without any problem. Now we are trying to deploy the first of these applications, and we are now stumped. The Visual Studio 2005 Deployment Project includes all of the DLL files and successfully creates the setup.exe...
0
1092
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 DLL files. As long as I keep the DLL files in the same directory as the primary output, everything is roses (good). If I try to create common folder or copy them to a Program Files Common
0
8413
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.