Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting ERR_CONNECTION_RESET from IIS with no information in logs

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.

like image 928
Eddie Fletcher Avatar asked Sep 15 '16 04:09

Eddie Fletcher


People also ask

What does it mean when a website says the connection was reset?

A connection reset message can be caused by several situations, but they all mean the same thing—the link between your web browser and the web server you are trying to reach is blocked or not working. You can troubleshoot some of this path but not all of it.

What does the connection was reset mean on Chrome?

What does “ERR_CONNECTION_RESET” mean? If you want to access a website with your browser and you receive the message “ERR_CONNECTION_RESET” instead, it means that the connection could not be established correctly. As a result, the connection has been “reset.”


1 Answers

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.

like image 79
Stefan Michev Avatar answered Sep 21 '22 06:09

Stefan Michev