Consuming JSON Web Service from jQuery and Server Code

This is a trick i learned today, if you have your web service returning JSON string to utilize on your ajax calls if you planned to connect to this service using server code (Web Reference) for internal facing app for example you have a problem.

If you are using HttpModule to alter the content-type to application/json you need to disabled this first, add web reference and then re-enable it again.

when trying to add web reference with Visual Studio you can’t get valid disco/wsdl files however if you added the reference while disabling the HttpModule and re-enable it again, it works.

Hope this helps.

Published Thu, Sep 3 2009 10:07 PM by Adel Khalil

Comments

# re: Consuming JSON Web Service from jQuery and Server Code

Tuesday, December 01, 2009 10:14 PM by fasf

sfdasdfds

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 4 and 2 and type the answer here: