I use the jQuery.ajax function to make a GET request to the following asp.net webservice:
[WebMethod]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
public string GetAgentsGroupNameById(int id)
I set the contentType to be ‘application\json’ and the dataType to be ‘jsonp’ but I still get an xml response:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="tempuri.org/">Sports</string>;
Here are the details of the request and the response, as shown in the chrome’s dev tools:

Am I doing something wrong with the request? or maybe with the webservice itself?
Seems like I have to add a script tag that will wrap the response (in the web service).
I know that it can be done automatically with WCF, but I’m not sure if asp.net webservices can do the job for me, so I’ll add an HttpModule that will do it and let you know.