Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:59:00+00:00 2026-06-14T11:59:00+00:00

I have one service that returns proper data in chrome but ends in error

  • 0

I have one service that returns proper data in chrome but ends in error for firefox and ie9. It looks like the GET returns 200 OK code, but still ends in error callback. I’m fetching data via backbonejs (with jquery.getJson and with ajax I’m getting the same result). The same result I’m getting also if I try to fetch data from remote server or locally.

Chrome: Version 23.0.1271.64 m
FF: 16.0.2
IE9: 9.0.8112.16421

wcf:

[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "/getData/{name}", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
List<Names> getData(string name);

serviceUrl:

"http://serverABC:4000/myService.svc/getData/test"

fetching from javascript:
via backbone or jqueryGetJson():

$.getJSON("http://serverABC:4000/myService.svc/getData/test", function () {
      alert("success");
  })
  .success(function () { alert("second success"); })
  .error(function (result) {
      console.log('error:', result);
   })

result:
“http://serverABC:4000/myService.svc/getData/test 200 OK 70ms”

headers:

Response Headers
Cache-Control   private
Content-Length  6544
Content-Type    application/json; charset=utf-8
Date    Fri, 16 Nov 2012 14:09:46 GMT
Server  Microsoft-IIS/7.5
Set-Cookie  ASP.NET_SessionId=s3aguluzip0dw135glbxlwwf; path=/; HttpOnly
X-AspNet-Version    4.0.30319
X-Powered-By    ASP.NET
Request Headers
Accept  application/json, text/javascript, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Connection  keep-alive
Host    svgwbip93:4000
Origin  http://localhost:51280
Referer http://localhost:51280/Default.aspx?ReturnUrl=%2f
User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0

result from debug:

readyState 0
responseText ""
status 0
**statusText "error"**
abort function()
always function()
complete function()
done function()
error function()
fail function()
getAllResponseHeaders function()
getResponseHeader function()
overrideMimeType function()
pipe function()
progress function()
promise function()
setRequestHeader function()
state function()
statusCode function()
success function()
then function()
toString function()

Response: – is empty (this is most probably the problem (but as I mentioned in Chrome I’m getting correct json data)

EDIT 1:
I tried to get raw response with fiddler and I’m getting the JSON. The big question is that why callback falls to error.
Here is my raw response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 29
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=kuv3g0r2dgmu5bpaoayj5lic; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 16 Nov 2012 19:32:58 GMT

{"PlatformDrawingsResult":[]}

I verified the json – it seems OK, so what can be the problem….hmm. I forgot to mention that I’m using also requirejs (not sure if that will bring some light,..)

Cheers, Miro

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:59:01+00:00Added an answer on June 14, 2026 at 11:59 am

    The solution is (thanks to jwkeenan) :

    I put this line at the beggining of each method in my web service and
    now all browsers work.

    HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*"); 
    

    and to get it to work in ie9 I needed to add this to my web app:

    $.support.cors = true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right, this is an odd one. We have a web service that returns data
I have a Web Service with Just one Web Method that returns a boolean
I have web Service method that returns value of one column of a table.
I have created one service in my grails application. in that service 25 methods
I have a windows service that does some intensive work every one minute (actually
I have a fairly straightforward WCF service that performs one-way file synchronization for a
I have a WCF service that is returning a block of xml. One element
Here is the scenario, I have a WCF service call that takes one string
Interesting one here. I have an ASP.NET 1.1 project that contains a web service
I have a .NET web service that returns an object and I get an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.