Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

An ASP.NET application may experience delays if a request times out when the application invokes in-process COM+ components


View products that this article applies to.

Symptoms

Consider 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. When you view the System log in Event Viewer, you may notice an event that resembles the following:

COM+ Event ID: 4768
Event Type: Error
Event Source: COM+
Event Category: Unknown Event
ID: 4786
Description: The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
Method Name: IObjectControl::Deactivate()
Exception: E0434F4D
Address: 0x77E649D3
Call Stack:
kernel32!RaiseException + 0x48
mscorsvr!CoEEShutDownCOM + 0xe448
mscorsvr!CoEEShutDownCOM + 0xe3cb
mscorsvr!CoEEShutDownCOM + 0xe37f
mscorsvr!CoEEShutDownCOM + 0xe322
mscorsvr!GetMetaDataPublicInterfaceFromInternal + 0x26ef
mscorsvr!CoEEShutDownCOM + 0x15eae
mscorsvr!ReleaseFusionInterfaces + 0x1d2fa
comsvcs!RegisterComEvents + 0x3f074
comsvcs!RegisterComEvents + 0x40146
ole32!ReadStringStream + 0x22057
ole32!CreateDataAdviseHolder + 0x1534
ole32!CoQueryAuthenticationServices + 0xf5f
ole32!CoQueryAuthenticationServices + 0x1b06
ole32!CoQueryAuthenticationServices + 0x2236
Event Type: Error
Event Source: Application Error
Event Category: (100)
Event ID: 1000
Description: Faulting application w3wp.exe, version 6.0.3790.1830, faulting module kernel32.dll, version 5.2.3790.2756, fault address 0x00015e02. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data: 0000: 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 77 33 77 ure w3w 0018: 70 2e 65 78 65 20 36 2e p.exe 6. 0020: 30 2e 33 37 39 30 2e 31 0.3790.1 0028: 38 33 30 20 69 6e 20 6b 830 in k 0030: 65 72 6e 65 6c 33 32 2e ernel32. 0038: 64 6c 6c 20 35 2e 32 2e dll 5.2. 0040: 33 37 39 30 2e 32 37 35 3790.275 0048: 36 20 61 74 20 6f 66 66 6 at off 0050: 73 65 74 20 30 30 30 31 set 0001 0058: 35 65 30 32 5e02

↑ Back to the top


Cause

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

↑ Back to the top


Resolution

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

↑ Back to the top


Workaround

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

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: KB917069, kbprb, kbbug, kbtshoot

↑ Back to the top

Article Info
Article ID : 917069
Revision : 6
Created on : 12/5/2007
Published on : 12/5/2007
Exists online : False
Views : 527