We have a button that saves asynchronously using AjaxToolKit/C#/.NET. I'm getting this in my Error Console:
Error: [Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException:
An unknown error occurred while processing the request on the server. The status code returned from the server was: 500' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
The strangest thing about this is that it's only happening on some machines (but not all). Everyone in the office checked this out in FF 3.0.4 and IE 7, and the save works fine for most people. For the handful of people that it doesn't work for, it fails in both browsers.
Any ideas of where to start troubleshooting this?
- I'd say it was a server/code error, but it works for most people.
- I'd say it was a javascript error, but we're all using the same browser.
- I might even say it was an OS difference, but it happens to both XP and Vista users.
- User Permissions are the same for all of us
The application was working correctly until this weekend's update, where we updated a UserControl on the page. If I remove that control, the save works fine on all computers. When I add the control, we have the above situation where it fails on random computers.
Answer
Unfortunately, this was hard to track down due to the mysteriousness of how AjaxToolKit returns errors. The real culprit was that there was HTML in some of our fields in the UserControl. We added ValidateRequest="false" to the top of our page, and our problems disappeared.
The way we ultimately found the problem was to remove the UpdatePanel from around our Save button.
Sorry I didn't think of this sooner, because it was pretty straightforward from there. I'm giving Michael the accepted answer for his hard work and exhaustive troubleshooting list.
-
Things to check:
- Reboot (oldie but goodie, and doesn't always go without saying)
- OS version (you did this)
- Web browser (you did this)
- Web browser settings (you covered this by trying multiple browsers)
- Network connectivity and Hosts file rules
- User permissions (you covered this)
- Application permissions (you covered this)
- OS locale settings (control panel: Regional and Language Options)
- Try and capture more information.
In this situation, I'd probably download a virgin browser to try to rule out browser settings. I'd throw Google Chrome onto a known good machine and a known bad machine to see what happens. If it works in both cases, then I'd look further at browser settings. I know that this isn't likely the case since it fails in both FF and IE, but IE this simple test could help provide a little more info nonetheless.
It's a weird one. Since it affects both IE and FF, I'd also look at the connectivity angle, the hosts file, and permissions.
Jon Smock : Good list - I'll edit my question to clarify some of theseJon Smock : Good call on the logs, searching now...Jon Smock : Can't find anything useful in IIS logs, Chrome didn't work on bad machine.Michael Haren : OK, since Chrome failed, we can ignore all the browser stuff, like cache, permissions, etc. What about the OS and network stuff? I assume you did a reboot, too...?Michael Haren : (Note that Chrome has to work on a good machine to be a valid test on the bad machine) -
It is not the error of Ajax, Somewhere your code has error.remove Ajax and then check,u will come to know What is exact error.
Ajit
0 comments:
Post a Comment