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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:00:46+00:00 2026-05-27T20:00:46+00:00

I am calling an ASP.net application that has an exposed JSON web service interface.

  • 0

I am calling an ASP.net application that has an exposed JSON web service interface. If I access the web service using Fiddler, everything works correctly and I get my desired result. I am trying to do the same thing using JQuery and I am running into issues. I will try to provide as much information as possible but not too much as to cloud the issue.

In Fiddler, I am using Request builder and sending a POST with the following information:

http://www.XXXXXXXXXX.com/TASService.svc/Logon

If I use Fiddler the request is sent as follows:

POST http://www.XXXXXXXXXX.com/TASService.svc/Logon HTTP/1.1
content-type: application/json
Host: www.XXXXXXXXXX.com
Content-Length: 50

{"Email":"XXXXXXXXXX@hotmail.com","Password":"#password1"}

As a result I get:

HTTP/1.1 200 OK
Date: Thu, 29 Dec 2011 21:36:09 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 38
Cache-Control: private
Content-Type: application/json; charset=utf-8

{"ContactID":52215,"Status":"Success"}

This is a good response (successful logon)

My HTML/JQuery is defined as follows:

<html>
<head>
<title>jQuery Test JSON</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
 $.ajax({
    type: "POST",
    url: "http://www.XXXXXXXXXX.com/TASService.svc/Logon",
    data: "{'Email':'XXXXXXXXXX@hotmail.com', 'Password':'#password1'}",
    contentType: "application/json; charset=utf-8",
    dataType: "jsonp",
    success: function(msg) {
      $('#msgid').html(msg.d);
    },
    error: function (errormessage) {
    $('#msgid').html("oops got an error!");
    }
  });
});
</script>
JSON Test Web Page
<div id="msgid">
</div>
</body>
</html>

Now when I call run the page in FireFox I get the following (FireBug):

"NetworkError: 405 Method Not Allowed - http://www.XXXXXXXXXX.com/TASService.svc/Logon?callback=jQuery171018036323126084708_1325195152450&{%27Email%27:%27XXXXXXXXXX@hotmail.com%27,%20%27Password%27:%27#password1%27}&_=1325195152469"

When I view what was sent (Fiddler RAW), I get the following:

GET http://www.XXXXXXXXXX.com/TASService.svc/Logon?callback=jQuery171026545743770048436_1325195246881&{%27Email%27:%27XXXXXXXXXX@hotmail.com%27,%20%27Password%27:%27 HTTP/1.1
Host: www.XXXXXXXXXX.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

What I notice right away is that it is sending a GET rather than a POST, although I specified a POST on the ajax request. I believe this is why I am getting the 405 error. However, am not sure why it is doing a GET rather than a POST.

Any assistance on this will be very appreciated since time is running short on my project.

  • 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-27T20:00:46+00:00Added an answer on May 27, 2026 at 8:00 pm

    jQuery won’t send jsonp as POST: http://www.markhneedham.com/blog/2009/08/27/jquery-post-jsonp-and-cross-domain-requests/ and http://devlog.info/2010/03/10/cross-domain-ajax/ show why.

    If you’re on the same domain as the web service use datatype: 'json' not datatype: 'jsonp'

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

Sidebar

Related Questions

I have an ASP.NET MVC application that produces a PDF file when calling an
I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I am developing a data-driven web application using ASP.Net MVC 3. I will be
I'm calling a WCF service from an ASP.NET application. From this, I am accessing
I have a major problem. We have a asp.net application that has this report
It appears that calling Html.RenderAction in Asp.Net MVC2 apps can alter the mime type
I have an ASP.NET application that runs under Classic .NET AppPool. I'm trying to
I have an ASP.NET MVC2 application that uses a parent controller to setup specific
I have a requirement that we need to make a telephone call using ASP.NET
From my ASP.NET application I am calling an INSERT stored procedure, there is a

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.