I have a problem that I can’t resolve, and am hoping someone might have some insight. I apologize in advance if this question seems vague, but it’s difficult to describe. I’ll do the best I can with it. Please feel free to ask clarification questions.
I have an ASP.NET 4.0 app that I inherited and am trying to retrofit for our use. When I build and run it in VS2010 (basically, just hitting F5), it works with no problem.
HOWEVER . . . I tried to create and publish a package with it (since I need to know if it works after deployment), and this is where I run into problems.
Specifically, the problem occurs in an AJAX call that tries to save data to a back-end SQL database. The script hits a “return false” in the JavaScript (to keep the front-end form from submitting), and it clocks . . . and clocks . . . and clocks . . . In other words, it hangs up. It does not give me any error messages or codes. It does allow me to click the [x] to get out of the processing message box, but as a result, my data does not save. Again, this ONLY happens in the published/deployed app. This DOES NOT HAPPEN when I run it in VS2010.
I’ve already determined that the back-end C# code is not the culprit (there are other functions on other pages that call the same code, and they work fine). I tried running a trace, and it seems like it’s hanging on the following piece of code in jquery-1.4.2.min.js.
return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w
(Note: this is in line 49 of the jquery-1.4.2.min.js file. Again, apologies if this seems vague.)
It almost seems like the code is caught in an infinite loop. I can’t figure out what’s causing it. Again, this is only after deployment. The VS2010 build (pre-deployment) runs fine.
I figure there’s a setting in the environment I need to check, but I don’t know where to look. Does anyone have any ideas?
Think I figured it out. Turns out that the service being called by the AJAX was throwing a 500 error without my realizing it.
If that ends up being the answer, I’ll mark this as such.
Edit: That turned out to be the answer. I found an environment-specific attribute in the code that was causing the 500 error. After I rewrote the code and published the application, it worked with no problem.