Article ID: 307513 - View products that this article applies to.
This article was previously published under Q307513
This article has been archived. It is offered "as is" and will no longer be updated.
This article refers to the following Microsoft .NET Framework Class Library namespaces:
If an ASP.NET application uses a custom configuration section handler, a first chance exception of type access violation may occur in the Aspnet_wp.exe process (or W3wp.exe process, foran application that runs on Microsoft Internet Information Services [IIS] 6.0) when the ASP.NET application is under stress.
This problem can occur when multiple threads are accessing the same configuration object simultaneously if your implementation of the IConfigurationSectionHandler interface is not thread-safe and stateless or if the object that the Create method returns is not thread-safe and immutable.
When you create a custom ASP.NET configuration section handler, use the following guidelines when you implement the IConfigurationSectionHandler interface:
Instances of IConfigurationSectionHandler must be thread-safe and stateless. You must be able to call the IConfigurationSectionHandler.Create method from multiple threads simultaneously.
Furthermore, the configuration object that IConfigurationSectionHandler.Create generates must be thread-safe and immutable. Because the configuration system caches the configuration objects, it is important that you not modify the "parent" argument to IConfigurationSectionHandler.Create. For example, if the return value of IConfigurationSectionHandler.Create is only a small modification of the "parent," you must modify a clone of the "parent," not the original.
For more information about ASP.NET configuration, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/307626/ )ASP.NET configuration overview
(http://support.microsoft.com/kb/309045/ )How to create a custom ASP.NET configuration section handler in Visual C# .NET