Getting ERR_CONNECTION_RESET from IIS with no information in logs

Eddie Fletcher picture Eddie Fletcher · Sep 15, 2016 · Viewed 11.5k times · Source

I am getting a ERR_CONNECTION_RESET in Chrome when my ASP.NET server is trying to reply with an error.

Usually I can find information about server errors by looking in the log files, but there is nothing there.

Running a debugger over the reponse seems to show everything is OK, except at the end, Chrome tells me the connection was reset.

Here is the code that is handling the exception handling:

    try
    {
       ...
    }
    catch (ArgumentException e)
    {
        Response.StatusCode = 400;
        Response.StatusDescription = e.Message;
        return new ContentResult {Content = "" };
    }

Chrome shows me net::ERR_CONNECTION_RESET in the console.

Using Fiddler, I get the error message [Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes.

If I Enable Failed Request Tracing in IIS, and open the generated xml file

    GENERAL_FLUSH_RESPONSE_END 


    BytesSent
    0 

    ErrorCode
    The parameter is incorrect.
     (0x80070057) 

I have spent hours trying to debug this without much luck.

Answer

Stefan Michev picture Stefan Michev · Feb 13, 2018

I had this issue after playing around with some virtual domains on the localhost and assigning SSL Certificates. Selecting the IIS Development Certificate for the current domain the error disappeared.