Click here to Skip to main content
Sign Up to vote bad
good
See more: JSONREST
Hii
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:
 
<CompanyList>
<Company>
<Action i:nil="true"/>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CreatedUser>00000000-0000-0000-0000-000000000000</CreatedUser>
<LastUpdatedDateTime>0001-01-01T00:00:00</LastUpdatedDateTime>
<LastUpdatedUser>00000000-0000-0000-0000-000000000000</LastUpdatedUser>
<VerificationPassword i:nil="true"/>
<Version>0</Version>
<Address i:nil="true"/>
<AddressId>00000000-0000-0000-0000-000000000000</AddressId>
<Id>b9ca2e32-ce88-4d72-99ce-9bc592511e85</Id>
<ParentCompanyId>00000000-0000-0000-0000-000000000000</ParentCompanyId>
<Phone i:nil="true"/>
<ProviderCompanyLookup i:nil="true"/>
</CompanyList>
 
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....
 
Thanks..
Posted 14 Sep '12 - 2:09
cutie1297
Edited 14 Sep '12 - 2:10


1 solution

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.
[WebInvoke(
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.
  Permalink  
Comments
cutie1 - 15 Sep '12 - 1:20
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 508
1 Arun Vasu 275
2 Maciej Los 228
3 OriginalGriff 215
4 Rohan Leuva 176
0 Sergey Alexandrovich Kryukov 9,670
1 OriginalGriff 7,409
2 CPallini 3,968
3 Rohan Leuva 3,352
4 Maciej Los 2,861


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 14 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid