Whenever I send an ajax request and retrieve data, the response varies depending on where I execute the code. When I test the web page using Visual Studio and inspect the output in developer tools, I see JSON format like
{"d":{"__type":"WebService+MyObject
, but when I run the same code through IIS, the response appears as XML <?xml version="1.0" encoding="utf-8"?>
<MyObject
.
It seems like there might be a missing setting causing this discrepancy, but I can't pinpoint what it is.
What could be causing this difference in response formats between running through Visual Studio and IIS?