This is a migrated thread and some comments may be shown as answers.

Set EnableHandlerDetection in web.config?

1 Answer 120 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 04 Oct 2013, 03:11 AM
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.

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 08 Oct 2013, 08:29 AM
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.

Regards,
Dimitar Terziev
Telerik
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.
Tags
ScriptManager and StyleSheetManager
Asked by
James
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or