Error message: Cannot access file AssemblyName because it is being used by another process


After you update ASP.NET content on a Web server that is receiving requests, you may receive the following error message in the browser:
Server Error in
/AppName Application.


Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Can not access file
AssemblyName because it is being used by another process.

Source Error:

Line 197: <add assembly="System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 198: <add assembly="System.EnterpriseServices, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 199: <add assembly="*"/> Line 200: </assemblies>
Line 201:

Source File: c:\WindowsDirectory\\framework\v1.0.3512\Config\machine.config Line: 199

This problem may occur if you update multiple files that would cause change notifications (such as Web.config, Global.asax, and files in the bin folder). When requests come in between two consecutive change notifications, they cause the AppDomain to be reloaded multiple times simultaneously.

Similar problems might also occur when you use a program on your server that locks folders while scanning. Examples of such programs are virus programs, indexing programs, and backup programs.


When you change a file that causes change notifications, the AppDomain reloads on the next incoming request. When this occurs, the Aspnet_wp.exe process lock the
Program/Shadow Copy folder (located in the Temporary ASP.NET Files folder), to be able to safely copy the new version of the program.

If you change another file while this is occurring, and a new request comes in, the AppDomain reloads again, and then tries to copy another new version of the program to the shadow copy folder while the folder is locked by the first AppDomain reload.


This fix is included as part of the .NET Framework 1.1.

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next .NET Framework 1.0 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Note You may also use the .NET Framework 1.1 to resolve this problem.

Note To fix the problem, install the fix, and then configure the settings in the "More Information" section.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date Time Version Size File name
14-Nov-2002 04:12 1.0.3705.377 196,608 Aspnet_isapi.dll
14-Nov-2002 04:06 4,169 Aspnet_perf.h
14-Nov-2002 04:06 20,468 Aspnet_perf.ini
14-Nov-2002 04:06 20,342 Aspnet_perf2.ini
14-Nov-2002 04:12 1.0.3705.377 24,576 Aspnet_regiis.exe
14-Nov-2002 04:12 1.0.3705.377 28,672 Aspnet_wp.exe
14-Nov-2002 01:42 1.0.3705.377 69,632 Corperfmonext.dll
14-Nov-2002 16:17 1.0.3705.377 1,953,792 Mscorlib.dll
14-Nov-2002 01:33 10,256 Mscorlib.ldo
14-Nov-2002 01:41 1.0.3705.377 2,269,184 Mscorsvr.dll
14-Nov-2002 01:41 1.0.3705.377 2,269,184 Mscorwks.dll
02-Aug-2002 03:38 15 Smartnav.htm
17-Oct-2002 23:55 8,728 Smartnav.js
29-Jan-2002 00:13 7,003 Smartnavie5.js
14-Nov-2002 16:18 1.0.3705.377 1,191,936 System.web.dll


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
The hotfix changes the following behaviors in ASP.NET:
  • Config errors are now only cached for 5 seconds.
  • File change notifications are combined based on the values of the following two attributes in the <httpRuntime> section in the Machine.Config
    • waitChangeNotification - number of seconds to wait for the next change notification before a new request will trigger an AppDomain restart
    • maxWaitChangeNotification - maximum number of seconds from the first change notification until the AppDomain is reloaded on a new request
    For example:
    <httpRuntime waitChangeNotification="5" maxWaitChangeNotification="10">
    The default value for both parameters is 0.
    Note that when you use the default values, you still see the problem that is described in the "Symptoms" section.

    The following are the suggested values for the properties:
    • Set waitChangeNotification to a number of seconds that exceeds the number of seconds that may pass between the updates of two change notification files in a copy.
    • Set maxWaitChangeNotification to a number of seconds that exceeds the length of time to complete the copy/deployment process.
    Because of this change, content may appear cached if you view it immediately after a copy/deploy process. This is typical behavior. The changes take effect when the wait period that you specified by using the previous parameters has passed.
  • Ten seconds after an initializationerror occurs in the HttpRuntime, the AppDomain closes.
  • The actual configuration error is now stored in the InnerException of the HttpException object.

문서 ID: 810281 - 마지막 검토: 2008. 7. 14. - 수정: 1