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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:14:59+00:00 2026-05-24T03:14:59+00:00

Not too sure what happened here. I’m using Visual Studio 2010 .NET 4. With

  • 0

Not too sure what happened here. I’m using Visual Studio 2010 .NET 4. With the following code, I WAS using JQuery 1.4.2 – with JQuery 1.4.2 the code worked just great. I’m calling a restful WCF RESTFUL method.

I created a simple Client with the following code:

Type = "POST";
    Url = "http://localhost:60922/servicestart/SaveAllClients";
    ContentType = "application/json; charset=utf-8";

    DataType = "json"; ProcessData = true;
    method = "SavePersons";
    Data = JSON.stringify(formApplication);

    CallService();


function CallService() {

     $.ajax({
          type: Type, //GET or POST or PUT or DELETE verb
          url: Url, // Location of the service
          data: Data, //Data sent to server
          contentType: ContentType, // content type sent to server
          dataType: DataType, //Expected data format from server
          processdata: ProcessData,    //True or False
          success: function(msg) {//On Successfull service call
           ServiceSucceeded(msg);
          },
       error: ServiceFailed// When Service call fails
      });
     }

Now, the restful code in a separate project:

[WebInvoke(UriTemplate = "SaveAllClients", Method = "POST", ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        public string SavePersons(Person peeps)
        {

            string xml = string.Empty;

            XMLToolset x = new XMLToolset();
            xml = x.SerializeToXML(peeps);

            xml = peeps.SerializeToXML(peeps);

            // send xml to Oracle -


             string json = string.Empty;

            Person p = new Person();
            p.first_name = "Good";
            p.middle_name = "Happy";
            p.last_name = "GH";

            json = p.ConvertToJson(p);

            return json;

        }

Now using jquery 1.4.2 the code worked really well – basically it is a cross domain request. I decided to swap out jquery 1.4.2 to jquery 1.6.2 – for the sake of staying up to date – and well – it doesn’t work now – it reports a service error O.

I studied the ajax documentation and the new features in jquery 1.5.2 and noticed a few things such as setting cross domain to true or using jsonp but neither of those worked.

Has something else changed in 1.6.2 from 1.4.2 in terms of how ajax functions?

  • 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-05-24T03:15:00+00:00Added an answer on May 24, 2026 at 3:15 am

    Your code is not working NOT because you switched from jQuery 1.4.2 to 1.6.2 but because you put your WCF service in a separate project. So I guess you hosted it in a separate application => you are now violating the same origin policy. And this policy has nothing to do with jQuery. It’s a browser limitation.

    So if you want to make this working you could configure your WCF service to use JSONP.

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

Sidebar

Related Questions

Not too sure what's going on here as this doesn't seem like standard practise
I'm not too sure what is going on here, but sometimes a particular file
I suspect this applies to general ASP.Net too but I am not sure. If
I'm having trouble running the below code on an Oracle DB. Not too sure
I'm not sure if this is a jQuery bug (using 1.7.1) or if its
Here's what I have tried so far. I'm just not too sure as to
I just got a site to manage, but am not too sure about the
Not really too sure how to word this question, therefore if you don't particularly
I'm not sure if the array is too deep or what, but I can't
Not too sure what to make of this, but program runs just fine in

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.