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

  • Home
  • SEARCH
  • 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 9266903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:25:31+00:00 2026-06-18T14:25:31+00:00

I have a simple enough web service: [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)] [WebMethod]

  • 0

I have a simple enough web service:

        [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
        [WebMethod]
        public string GetToken(string a)
        {
        }

And I’m calling it client side using JQuery:

    $.ajax({
        post: 'GET',
        contentType: "application/json; charset=utf-8",
        dataType: 'json',
        url: '../url/GetToken',
        data: "{'a':'test'}",
        success: function (data) {
        },
        error: function (a, b, c) {
        }
    });

The call always fails and the error returned is 500 Internal Server Error. I have placed a breakpoint inside the web service, and the code isn’t being reached at all. When I modify the web service to take no arguments at all (and remove the data element from the JQuery call) the call succeeds. I have played around with different ways to pass the data element; I’ve passed a JSON object (no quotes), and I’ve removed the quotes from around the a argument. None of it works.

Edit:

Using Fiddler I have determined that the actual error causing the 500 is “Invalid web service call, missing value for parameter”.

Edit 2:

Passing data this way works:

data: "a='test'"

I have no idea why. Any ideas?

  • 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-18T14:25:32+00:00Added an answer on June 18, 2026 at 2:25 pm

    Haven’t tested this, but in your code snippet you have post: 'GET' rather than type: 'GET'. That may be causing the server to reject the contentType as json (which is why your data isn’t being serialized properly).

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

Sidebar

Related Questions

I have written a simple web service (asmx) in c# The clients hit the
I have a simple three table reference. It looks plain enough. The associations there
I have simple win service, that executes few tasks periodically. How should I pass
I need to call a web service from my classic ASP website. I have
The problem: I have a web service up and running ok, the problem I
I have a problem with calling .Net web services with a Firefox client. A
I have a web service proxy. On that proxy there is a method that
I have some basic questions related to the conversion of Web Service (.asmx) into
i am creating a simple SOAP web service. i am to ensure that it
I am developpng a simple web service: void deleteCar(int idCar) Currently, what I am

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.