Article ID: 271787 - Last Review: June 25, 2004 - Revision: 2.1 PRB: Application.Lock and Application.UnLock Cause Server to Hang in IIS 5.0This article was previously published under Q271787 On This PageSYMPTOMS
When you modify Application variables from within a component that is called from an Active Server Pages (ASP) page, your server may stop responding (hang). The code in the component that causes the problem resembles the following:
CAUSE
Code that is embedded in the Application.Lock and Application.UnLock methods provides protection in a multi-user environment. With the introduction of COM+, Internet Information Server (IIS) 5.0 takes advantage of the Thread-Neutral Apartment (NA) when accessing the Application object. As a result, when you explicitly call Application.Lock and Application.UnLock from within a component, under certain scenarios you might encounter a deadlock scenario that causes the server to stop responding. This problem is most commonly seen when ASP intrinsics are marshalled back and forth between the IIS server and the COM+ Application server. The following two scenarios may cause the server to hang:
RESOLUTION
The Application.Lock and Application.UnLock methods are not needed to assign a single Application variable because the methods are called internally. If you need to assign multiple Application variables within the same Application.Lock and Application.UnLock methods from your component, your component must run in the same process as the caller, or you must modify your logic to only include a single assignment. For example, the following code MORE INFORMATIONSteps to Reproduce Behavior
| Article Translations
|
Back to the top
