Click here to Skip to main content
12,300,878 members (62,448 online)
Rate this:
Please Sign up or sign in to vote.
See more: JSON REST
In implementing the REST service when I run the URL then I get the following error..
"[Fiddler] ReadResponse() failed: The server did not return a response for this request."I want to return the response in JSON format ?However when I check for returning the response in XML format then its working absolutely perfect...What could be the possible cause of this when I return JSON response?
This is my XML response:

<Action i:nil="true"/>
<VerificationPassword i:nil="true"/>
<Address i:nil="true"/>
<Phone i:nil="true"/>
<ProviderCompanyLookup i:nil="true"/>

In the above response is default i.e returning null.I have gone through Google that one of the problem can be a DateTime issue.So have to set it to a bigger value..But couldn't understand where to set and how to set ?

If this is not my problem then what could be the problem?

Any help is appreciated....

Posted 14-Sep-12 2:09am
Edited 14-Sep-12 2:10am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Based on my answer to your previous question, I take you are developing WCF REST service. Have you defined properties of WebInvoke attribute as below. Change Method type to POST if you are using POST method.
Method = "GET",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "/SampleUrl")]

You may refer my below Tip/Trick on the topic of "Debug WCF REST Service" using Fiddler. (Not an advertisement Smile | :) )
Debug WCF REST Service.

Above Tip is based on XML data, just use Content-Type: application/json in "Request Headers" Tab of Fiddler.
cutie1 15-Sep-12 1:20am
Yes I Have defined my webinvoke attribute with Method="GET".When I use content-type:application/json its not showing any response..I don't know where Iam I going wrong?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 14 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100