Out of Memory - Infinite Loop - ASP.NET AJAX Framework - asp.net

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

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

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

Related

"cacheInternal" is not recognized after KB4024848 installation

I am taking over an ASP.NET MVC application from someone who left. The application was developed using .NET Framework4.
Everything was working fine, until an automatic security update was pushed to the system.
Basically, the following statement now throws a NULL exception after the push of KB4024848:
object obj = typeof(HttpRuntime).GetProperty("CacheInternal",BindingFlags.NonPublic|BindingFlags.Static).GetValue(null,null);
Looks like the key string "cacheInternal" is not recognized anymore.
Rollback of KB4024848 would make the statement work again.
Any idea about this issue, as well as what could be an alternative solution to get the same object value? (This statement is part of a section of code trying to get a list of active sessions, using InProcSessionState.)
Your solution to this question will be greatly appreciated, since we have been spending quite sometime to work on it.

Website doesn't build, but works correctly in browser ASP.net

When I build my website project using visual studio 2016 (or any visual studio for that matter), the compiler gives me an error:
However if I go to the code file ResetPassword.aspx the edtEmployeeSurname control is present and it has a runat="server" attribute.
There is also no errors given to me if I open the ResetPassword.aspx.vb code file. (So no red lines under any variable names / Control ID's).
What is really interesting is that the website (Even ResetPassword.aspx) loads correctly from the browser without any issues and I can submit the form.
If I comment out all the code in ResetPassword.aspx.vb then it just finds another control that "Doesn't Exist" and so it carries on with a lot of pages.
All I want to know is:
What causes these issues
How to fix these issues OR how to determine what the issue is.
If this is a common mistake that some developers make then please help me to formulate a search string to use in google, because most of my search results were obscure or off topic.
I've run into this sort of thing before and I believe the errors you are seeing are red herrings. They lead me to believe that one of your lower projects where your user controls are defined, or possibly even lower than that, has a possibly unrelated error in it which is causing it to not be built by visual studio, which in turn makes visual studio think your user controls aren't defined.
What I normally do is build the solution and watch the output window. It will build all of your projects individually, the first error you see pop up in the output window is the source of your problem. Everything else you are seeing is a symptom of that original issue. If you fix the first error that shows up in your output then it will either build correctly or you will have to repeat the process with the next error that pops up.
Visual Studio used to order the errors in the error list in the order that they came up during the build but that has changed, I, personally, really preferred the old sorting(I think there is a setting that you can use to get back to the old sorting but I can't think of it off the top of my head).
From screenshots, it shows you have 50 errors in your project. There is no way an application will run successfully if you have not set to do so.
You could make application run, even if errors.
Check SO post :
Debugging runs even with compiler's errors in Visual Studio
Note:
If you have already cleaned and rebuilt solution,
Try running application in other browser or another computer, may be you have data shown from previous successful result.
Based on the wording of the error, I believe it's possible you are referring to some of these controls outside the code behind of ResetPassword.aspx. The latter part of the message says It may be inaccessible due to its protection level. By default, the backing variable for a control you place on a form is Protected and therefore cannot be seen outside the scope of that control or its inheritance chain.

Wrong reports by fastreport

We are using fastreport as report-engine for our asp.net-mvc-webapplication. Since months we are encountering heavy problems in using fastreport. Reports are shown in a seperate tab. They always include the fastreport-bar containing the refresh-button. This fastreport-refresh button refreshs the report by using the internal cache of fastreport. But at this point something is going wrong:
When the user refreshs the report a completely different report is shown. This refresh is a fastreport-function and does not involve any of our sourcecode. Users using the reports seems also having trouble with their session. They are regular asked to relogin since the session/authentication is not valid any more - users don't using any reports do not have these issues. Refreshing by browser is no problem.
Since we have not yet found a solution in collaboration with fastreport we are looking for other users encountering this issue and may have a solution.
You can send your message on support.fast-report.com. Also attach test project there.

F# - Visual Studio Debugger - Stepping over causes continue

I'm currently trying to learn F# and am having some problems with the Visual Studio 2015 debugger. Taking the following code as an example (I'm playing around with ASP.NET Web API):
[<Route("api/HomeApi/VideoCapture")>]
[<System.Web.Http.HttpGet>]
member this.VideoCapture() : HttpResponseMessage =
let response = this.Request.CreateResponse()
this.SetupCameraConsumers()
this.SetupCapture()
response.Content <- new PushStreamContent(this.Test())
response
I have put a breakpoint at the first line in this method, stepping over the 'let' works fine, but when I try to step over the next line, VS debugger essentially continues to the end of the method without throwing any errors. Within the this.SetupCameraConsumers() call, I am simply adding some objects to a list and returns a 'unit'.
Has anyone come across anything like this before? If I can provide any more information please let me know - I've used the VS debugger for C# code and have never encountered anything like this.
Am I calling a method correctly? Is this allowed in F#?
Thanks!
Just for anyone else who may run into this issue, disabling the debugging option 'Just my code' allows me to step over the code. I'm not entirely sure why that should make a difference though. Thanks again for the helpful comments provided.

Aviarc Cannot Create Null Databroker

Just wondering if any one might now how to fix this issue.
Every part of the databroker is created and also all the database connectivity is functional.
But once we try to place them together we come up with a error saying cannot create Null Databroker.
The thing that is really strange is that we have databrokers that are basicly the exact same working.
Can any one shine some light on this issue?
We worked on this together today. We did three things to troubleshoot and fix the problem:
we changed the calling workflow so that the dataset is refreshed inside the show-screen tags (previously, this was done before the screen was called).
we refreshed the dataset (a H2 db) and connected the database (before, it showed as pool not open)
we changed the database name to main
It is working now.
"Null databroker" suggests that the broker was not created correctly, although it doesn't look like that was the case since you don't mention having to modify it to get it to work.
In these cases it can be useful to look at the error logs through the admin app to see if there are errors being thrown at some time other than compile time.

Resources