Fiddler Error - ReadResponse: Server did not respond to this request

This was the first time I encountered such an error when I was involved in the RESTful web service a couple of times. It’s hard for me to trace the cause of the error, I hope you could help me.

I have this attribute for login service

[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Json)] 

Using a script to use the service:

GET http: // localhost: 3445 / Authenticate / Login? Username = jsm & password = a & ip = 1

enter image description here

Fiddler answer:

 [Fiddler] ReadResponse() failed: The server did not return a response for this request. 

enter image description here

I'm not sure if this is called Content-type: application/json , because when I try to change it to xml:

 [WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Xml)] 

This gives me this result:

enter image description here

Peculiar. What have I done wrong? I have to return the json object .. Thanks!

+4
source share
5 answers

The cause of the error is loading bundle data types (see xml data preview above). Json has a limit of approximately 65K objects, and in my project it exceeds the limit. Thus, the final decision is to create a DTO - a “data transfer object” that minimizes the data being transmitted.

+4
source

I had the same error a couple of times due to different problems. The main reason is because wcf cannot serialize the object.

in my first case, it was because the returned object is not the correct object specified in the service. the service should return a student object, but I am returning a studentExtended object (inherited object).

in my second case, it was due to the dateTime property, which was in a form that was not serializable (it was null). so I changed it to DateTime. but so after that it worked again

Hi

+1
source

I had the same Fiddler problem.] ReadResponse () failed :. The resolution for me was: In IIS, dispose of application pools where the application resides.

0
source

I used Xampp and Install Fiddler ... The same error occurred ...

I start IIS only once (since it was stopped due to the launch of Xampp) and everything went fine. :)

0
source

I ran into the same problem. Finally, it turned out that the problem was in determining the type of Contract for the returned object.

I replaced [DataMember] with [EnumMember] as described below:

 [DataContract] public enum DiscountType { [EnumMember] NONE = 0, [EnumMember] PERCENTAGE_DISCOUNT = 1 } 

This fixed my "[Fiddler] ReadResponse ()" error, which took half a day.

0
source

Source: https://habr.com/ru/post/1398162/


All Articles