The server method xxx failed (asp.net ajax)
I have a website project, that is开发者_StackOverflow中文版 working fine. However every once a while certain ajax pages (that make calls to a webservice) throw a "the server method xxx failed". I have ELMAH installed, however do not see any stacktrace or anything. The worst is that I can not reproduce the error locally. I just get an email notification from ELMAH. Does anybody know how I can fix this issue?
Edit: After 1 year I am still having the same issue.
It's too insufficient description. My assumptions:
- Did you add
EnablePageMethods ="true"
to yourScriptManager
control? - If yes, did the control (if it is; e.g. button) which call the web service method perform an anync postback instead of full one?
- Does the signature of server method and a call from the client-side match?
- Are you using URL rewriting?
I had the same issue and found my application firewall was blocking the content-type 'application/json'. Check if you have anything running on the web server that could be blocking the page method.
I happened the same with ASP.NET, remove the property runat="server"
and run success
精彩评论