AWG Blogs

Sunday, March 18, 2012

Force Post in .load method

The following code:
may produce the error in the Response as visible from the Console tab of Firebug: "Request format is unrecognized for URL unexpectedly ending in '/HelloWorld'."

This ASP.NET web service expects a POST. To force a POST change the code by adding a bogus object to the .load jQuery method:

Update: Actual fix is to edit the web.config, see comment by Lotas here.