Search code examples
jquerycross-domainfiddlerwcf-rest

Can Fiddler show wrong information?


How could Fiddler show info which is different from what I see in debugger?

I have HelloWorld RESTful service on server side. When I called it from browser, everything is OK. enter image description here

I can see this in Fiddler. enter image description here

But then I tried to call this service from javascript with jquery.ajax method and something goes wrong. enter image description here

Status is "error" and second parameter is not very descriptive. enter image description here

At first I thought that something wrong with cross domain request, but then I saw in Fiddler that everything was OK with this request/response. enter image description here

Why is that?


Solution

  • I'd look at the JavaScript console. You probably have a JS error there.

    You say that this is a cross-domain request. The problem is mostly likely that you are blocked by the Same Origin Policy.

    The HTTP request and response worked fine, but the browser is denying JavaScript access to the data for security reasons.

    You need to modify the server so it gives permission to read data to JavaScript on your site.