views:

1186

answers:

3

We're running on .NET 3.5 SP1.

Recently, in IE, some of our users started getting "Out of Memory" errors once in a while. This doesn't happen all the time. I managed to replicate it a couple times and I found that this code, from the AjaxControlToolkit.Common.Common.js file, was causing an infinite loop: AjaxControlToolkit.TextBoxWrapper.registerClass('AjaxControlToolkit.TextBoxWrapper', Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue = function(id) { var control = $get(id);if (control && control.AjaxControlToolkitTextBoxWrapper) { return control.AjaxControlToolkitTextBoxWrapper.get_Value();} return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(id);}

The last line (which calls _originalValidatorGetValue) basically calls back this exact function over and over because control.AjaxControlToolkitTextBoxWrapper is undefined.

The function defined right above it is AjaxControlToolkit.TextBoxWrapper.get_Wrapper(control) and could be use to create the wrapper if it doesn't exist, but I don't get the feeling I want to be changing the framework if I'm the only one who's seen this bug in the wild.

The bug does not always occur. It seems to occur when the first URL that is loaded contains an AJAX history point. If you open up a page and play with it, causing history points to be added, it works fine. But if you copy-paste the URL into another browser windows, you will get this problem.

Therefore, my guess is I am doing something wrong with the history control that doesn't setup the wrappers properly. Even so, there appears to be an infinite loop in there.

Any ideas/clues?

I filled out a bug report on Microsoft Connect. While filling it out and testing various scenarios, I noticed it was working fine locally but not remotely. Comparing my production/development environment, I noticed CombineScripts was false locally. Deploying that to my production server seems to have resolved the issue.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=373171

A: 

You might want to post a bug report on Microsoft Connect.

SoloBold
A: 

got same issue with you, any solution yet?

I used CombineScripts=false and it seems to have worked.
Jason Kealey
Thanks Jason. It's fine to use CombineScripts=true. The solution to my problem is, sometime the validators with Visual studio doesn't work well with AJAX toolkit, such as the RequiredFieldValidator and etc.Nick
A: 

If you remove LoadScriptsBeforeUI='false' from ScriptManager, this problem is solved.

Amit Kumar
What are your sources concerning this solution?
Jason Kealey