[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Json Not supported error in ajax jquery

Posted on 2013-05-29
1
Medium Priority
?
507 Views
Last Modified: 2013-06-25
Can someone tell me why this is running ok on my local build but not working when deployed to server. On server it generates error on page warning at bottom left hand corner, when I click to see message it tells me that JSON is not supported.

What is so different in that its coming from the server?

When I copy the entire site from server to local it runs perfect so its not a code difference.


$.ajax({
                type: "POST",
                url: "ContractsList.aspx/StoreSearch",
                data: JSON.stringify(DTO),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(result, txtstatus) {
                }
            });
0
Comment
Question by:jazz__man
1 Comment
 
LVL 4

Accepted Solution

by:
Ahmed Hussein earned 2000 total points
ID: 39204831
change contetType from contentType: "application/json; charset=utf-8", to contentType: "text/json; charset=utf-8",

~AG
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question