Set EnableHandlerDetection in web.config?

2 posts, 0 answers
  1. James
    James avatar
    1 posts
    Member since:
    Feb 2013

    Posted 03 Oct 2013 Link to this post

    Is there a way to set this specific property to false in the web.config? 

    The reason I ask is we have a vendor application that uses this control in all of it's pages. Every so often when the server is busy the ASP.NET application ends up with a stuck finalizer.

    When ripping apart the dumps I see that every page that is hung, all 200 of them, are in the Exists() method for WebResource. More specifically it's when the application is churning through the ConfigSectionElementsCollection enumerator. When I look at the finalizer I see a RCW object being destroyed. In the destruction the thread is calling over to a COM component for it to be Unmarshalled. At the top of the stack we can see the thread is waiting on one event handle.

    I searched the dump and found that another thread is also waiting on this handle and another event handle. Another thread is waiting on some other combination of a new handle and the handle from the previous threade, and so on and so on.

    Unfortunately there is no symbol that resolves to heythere!TheProblemIsHere()+0xbeef so I have to do some sleuthing to pick parts from around the locking method and the calling methods.

    In both cases what I find is the COM objects that are being Marshalled all come from the ahadmin.dll. This is the underlying unmanaged resource that backs Microsoft.Web.Administration.WebConfigurationManager class.

    Some more information that is possibly useful. The application we run uses AspCompat for all of its pages. This means that every request thread runs in a STA thread and is not truly efficient. So, between the sheer amount of COM calls generated by both the AspCompat and the ConfigManager we start seeing blocked threads.

    So, in the end it looks like there is some kind of resource contention when you have a couple hundred threads all trying to read from this management interface. I'm not 100% sure if it's really meant to handle that many threads banging away at it's enumerators, but I could be wrong.

    Thanks for any help you can provide.
  2. Dimitar Terziev
    Dimitar Terziev avatar
    1268 posts

    Posted 08 Oct 2013 Link to this post

    Hi James,

    Currently this property could be set only per individual control basis and could not be defined globally in the web config file. This has been forwarded to the development team as a feature request.

    Dimitar Terziev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top