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.
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:
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.
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.