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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:10:35+00:00 2026-05-28T18:10:35+00:00

I am having issues calling an ASP.NET web service in JQuery. I am basically

  • 0

I am having issues calling an ASP.NET web service in JQuery. I am basically following all the instructions on:

http://www.codeproject.com/Articles/211489/Using-JSON-with-ASP-NET-3-5

I have written the Web service and the console server in C# and ASP.NET.

My JQuery is as follows:

    jQuery.support.cors = true;
$.ajax({
    type: "POST",
    contentType: "application/json; charset=ut-8",
    username: "John",
    password: "Doe",
    url: "https://machinename:8043/WtfService/HelloWorldPostSimple1",
    data: '{"firstName":"John"}',
    dataType: "json",
    success: function(msg) {
        alert(msg.d);
    },
    error: function(jqXHR, textStatus, errorThrown) {
        alert(jqXHR + " : " + textStatus + " : " + errorThrown);
    }
});

The first line allows for cross domain calls in IE which works. If I call a web service method that doesn’t accept parameters, it works 100% for GET and POST.

My web service method is as follows:

[WebInvoke(Method = "POST", UriTemplate = "HelloWorldPostSimple1")]
[PrincipalPermission(SecurityAction.Demand, Role = "WtfUser")]
public string HelloWorldPostSimple1(string firstName)
{
    return string.Format("Hello {0} {1}", firstName, "Doe");
}

I’ve tried specifically putting in the Request and Response formats as JSON but still no luck.

  • 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-28T18:10:36+00:00Added an answer on May 28, 2026 at 6:10 pm

    Thanks a lot everyone.

    Turns out utf-8 was spelt wrong 🙁

    Thanks Dave Simione for picking that up!

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

Sidebar

Related Questions

I'm having issues connecting to an ASP.Net web service using PHP. The web service
i am having a strange problem, while calling ajax jquery in asp.net.. i am
Hi All I am currently having an issue calling a WCF service from a
I would really like use the jQuery Validation plugin in my ASP.NET Web Forms
I'm having issues creating an ActionLink using Preview 5. All the docs I can
I'm having some performance issues calling CGContextDrawLayerAtPoint in iOS 4 that didn't seem to
I've been having some issues with calling -becomeFirstResponder on a UITextField contained with a
As an overview, I'm having issues with a UINavigationController inside of a UITabBarController calling
Having issues calling the ReportingService2005.FindItems() method from within powershell v2. $rs = New-WebServiceProxy -Uri
I'm trying to do my first pyopengl program but having some issues when calling

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.