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 8912639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:15:14+00:00 2026-06-15T04:15:14+00:00

Following is my code from jQuery script: $(document).ready(function () { $.ajax({ cache: false, type:

  • 0

Following is my code from jQuery script:

    $(document).ready(function () {
          $.ajax({
              cache: false,
              type: "GET",
              async: true,                  
              dataType: "json",
              url: "http://localhost:9002/SampleServices/Service/REST/Employees",                  
              processdata: false,                  
              error: ServiceFailed,
              success: function () { alert("succeeded");   }
          });
      });

      function ServiceFailed(result) {
          alert('Service call failed: ' + result.status + '' + result.statusText);
          Type = null;
          Url = null;
          Data = null;
          ContentType = null;
          DataType = null;
          ProcessData = null;
      }

      function ServiceFailed(xhr) {
          alert("error");
          alert(xhr.responseText);
          if (xhr.responseText) {
              var err = xhr.responseText;
              if (err)
                  error(err);
              else
                  error({ Message: "Unknown server error." })
          }
          return;
      }

When I run the above code it always enters ServiceFailed(xhr) and alerts “error”.

When I try to execute the above url (“http://localhost:9002/SampleServices/Service/REST/Employees”) through the browser I get following JSON response:
{“page”:1,”records”:1,”rows”:[{“cell”:[“1″,”Haris”,”21-03-1979″,”HR”],”id”:1}],”total”:1}

Fiddler says following when I run the jQuery script:

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
1   200 HTTP    localhost:9002  /SampleServices/Service/REST/Employees?_=1340833203960  89      application/json; charset=utf-8 chrome:1448         
  • 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-15T04:15:15+00:00Added an answer on June 15, 2026 at 4:15 am

    carlosfigueira nailed it.

    This was a cross domain request hence i needed to add crossdomain support in App.config file for my WCF service

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code inside the tags gives error: Object Expected. <!-- JQuery/AJAX--> <script type=text/javascript>
Hi I found the following code from this page JQuery UI DatePicker using 2
I am using dialog plugin from jQuery UI 1.8.17. The following code works and
I'm using jQuery version 1.7.1 from Google CDN and have the following code: $(menuInstance).delay(2000).removeClass('loading').html(ul);
I have the following jQuery script running on my page: <script type=text/javascript charset=utf-8 src={{
I'm trying to get JSON data from a website using the following code, but
When reading a CSV file from a server using the jQuery 'GET' function I
here is my code; $(document).ready(function () { $('#btnAddCat').click(function () { var cn = $('#txtCategoryName').val();
the following code (from a database object created for each new view): -(void)update:(NSString *)queryText{
I have the following code: from random import randint,choice add=lambda x:lambda y:x+y sub=lambda x:lambda

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.