An ASP.NET application may experience delays if a request times out when the application invokes in-process COM+ components (917069)
The information in this article applies to:
- Microsoft COM+ 1.5
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ASP.NET 2.0
SYMPTOMSConsider the following scenario. A Microsoft ASP.NET application invokes in-process Microsoft COM+ components. The request times out at the precise moment as certain operations occur in a COM+ component. In this scenario, the COM+ runtime may report a fault to the Windows Error Reporting subsystem. Then, Windows Error Reporting may take actions that can cause additional delays in the application and compound the underlying problem.CAUSEThis problem occurs when the time-out threshold for an ASP.NET request is exceeded. The ASP.NET runtime stops the request by throwing a ThreadAbortException exception for the thread that processes the request. If the ASP.NET request invokes an in-process COM+ component, and if any one of the IObjectControl methods of the component are running at the time of the ThreadAbortException exception, the COM+ runtime will catch the exception and report the fault to Windows Error Reporting. Then, Windows Error Reporting may create event log entries and communicate with error reporting servers. When this behavior occurs, the thread that runs the ASP.NET request will block, and the response is delayed. Windows Error Reporting may also create a dump file of the process. When this behavior occurs, the process is frozen, and all responses are delayed. Processes that host in-process (Library) COM+ applications are not terminated when these faults occur. Additionally, the cycle may repeat during subsequent time-outs and cause additional delays.
Note The sample in the "More Information" section uses a Microsoft .NET Framework ServicedComponent class. However, the same problem can occur if the application uses unmanaged COM+ components.RESOLUTIONTo resolve this problem, avoid the ASP.NET time-out. If the ASP.NET requests are not expected to exceed the time-out threshold, investigate and resolve the source of the underlying delays. The following methods can be effective tools to discover the source of the underlying delay: - Analyze dump files of the process that were taken when you experience the underlying delay.
- Run the application under a profiler utility.
- Use logging throughout the application.
In some scenarios, the requests should be expected to take longer than the default ASP.NET request time-out. In these scenarios, you should change the time-out value to a more appropriate value. To do this, use one of the following methods: - Use the executionTimeout setting.
- Use the Server.ScriptTimeout property.
WORKAROUNDTo work around this problem, you can change the COM+ application from an in-process (library) application to an out-of-process (server) application. In a server application, the COM+ components run in a separate process from the ASP.NET requests. Therefore, the COM+ runtime does not detect a ThreadAbortException exception, and the exception is not reported to the Windows Error Reporting subsystem.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbtshoot kbBug kbprb KB917069 kbAudDeveloper kbAudITPRO |
---|
|