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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:52:53+00:00 2026-05-22T18:52:53+00:00

I am trying to post some info with an ajax request to a webservice

  • 0

I am trying to post some info with an ajax request to a webservice I wrote with some json data

Here are the C# parameters the method receiving it uses

public bool AdvancedIWant(string WantTitle, 
int WantCategory, 
string WantBlogID, 
float WantPrice, 
string WantComments)

When I go to the asmx control directly and enter in the values it works fine so it is something with my json format I am guessing…
I used firebug to look at the ajax headers and I got this under post

JSON WantComments “sdfa” Source
{“WantTitle”: “sdfs”},
{“WantCategory”: 1}, {“WantBlog”:
“FCA184D9-9F50-473F-922D-04E0EE004AB8”},
{“WantPrice”: 5.55}, {“WantComments”:
“sdfa”}

this under response

{“Message”:”Invalid JSON primitive:
{\”WantCategory\”: 1}, {\”WantBlog\”:
\”FCA184D9-9F50-473F-922D-04E0EE004AB8\”},
{\”WantPrice\”: 5.55},
{\”WantComments\”:
\”sdfa\”}.”,”StackTrace”:” at
System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String
input, Int32 depthLimit,
JavaScriptSerializer serializer)\r\n
at
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer
serializer, String input, Type type,
Int32 depthLimit)\r\n at
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String
input)\r\n at
System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext
context, JavaScriptSerializer
serializer)\r\n at
System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData
methodData, HttpContext context)\r\n
at
System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
context, WebServiceMethodData
methodData)”,”ExceptionType”:”System.ArgumentException”}

I am guessin my json format is invalid?? I’m not sure maybe I am just missing something at 2 am.

  • 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-22T18:52:54+00:00Added an answer on May 22, 2026 at 6:52 pm

    Shouldn’t your post to server be like this:

    {"WantTitle": "sdfs", "WantCategory": 1, "WantBlog": "FCA184D9-9F50-473F-922D-04E0EE004AB8", "WantPrice": 5.55, "WantComments": "sdfa"}
    

    Compare above with your JSON. I feel you have constructed your JSON in wrong format.

    Further watch out for WantBlog, in service your parameter says WantBlogId.

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

Sidebar

Related Questions

I'm trying to make a function that uses jquery's ajaxfunction to get some info
I am trying to send a AJAX request to the server when a user
so my code works fine by itself, but I'm trying to add some ajax
I'm trying to post some information from a from do so some calculations, however
I'm trying to print some extra info when in compile a library using ndk-build.
I'm trying to open a facebook post dialog when I click on some element.
I'm trying to embed some rails data in an external js file instead of
I'm trying to upload some data to my App Engine datastore using the bulkuploader.
I am trying to add data to a sql database by entering info in
I'm trying to make a POST request to my Sinatra app, but I'm having

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.