I have a RESTful WCF service (.NET 3.5), which has a function that is supposed to return a list of patient details by matching with the search criteria I have provided. I am facing a issue, wherein if I provide a search criteria that returns one patient detail it works fine; but when I provide a search criteria that returns multiple patient details, I get an error “Connection reset by peer 502”.I am using Fiddler to test it since request and response are both in JSON format.
The following is the error I get :
<HEAD><TITLE>Connection reset by peer</TITLE></HEAD>
<BODY BGCOLOR="white" FGCOLOR="black"><H1>Connection reset by peer</H1><HR>
<FONT FACE="Helvetica,Arial"><B>
Description: Connection reset by peer</B></FONT>
<HR>
<!-- default "Connection reset by peer" response (502) -->
</BODY>
I am pretty sure it was working fine at one point of time when it returned two set of patient details, but it suddenly stopped working without any good reason. And I have enabled Application Logs using health monitoring, it shows application started and no error as such. The other function, which is a “login” function works perfectly fine.
Figured out the problem. I had
IsRequiredset totruein the Response class ofData Member, which was giving the error