Friday, October 14, 2011

$ajax Web Service Not Working

Really big gotcha on a site I recently inherited. Scenario: Ajax call worked fine in dev, did not work upon deployment. RDC to test server and run same page from there, all works fine. So, works when invoked locally but not by remote client. Same code ... same(?) security context... Symptom: (overly helpful) Server response is “Request format is unrecognized for URL unexpectedly ending in … ” Solution: Add this node under < webServices> < protocols> < add name="HttpGet"/> < add name="HttpPost"/> < /protocols> < /webServices> Reminder: Trap and log errors in your $ajax calls

No comments: