What is causing long running HTTPS requests to be executed twice in ASP .NET Core application on IIS 8.5

SAB 0 Reputation points
2023-05-24T06:25:00.9533333+00:00

Hello,

We are hosting an ASP .NET Core 6 application on IIS 8.5 Windows Server 2012 R2. This application provides Microsoft.AspNetCore.Mvc.Controllers to an Angular application. One of the supported calls can take quite a long time (10-15 minutes). Now with this call we are experiencing some unfortunate unwanted behavior. Looking at the browser call I can see that the call is executed exactly once, it runs for about 7-8 minutes, then it fails with net::ERR_EMPTY_RESPONSE.

If I look at the server log however I can see that Microsoft.AspNetCore.Hosting.Diagnostics reports the call to be started again after several minutes have elapsed. Both calls actually seem to finish successfully but since they are POST calls creating data this is absolutely not what we would want to happen. So I've tried to find some info about this and there were very few posts that sounded kind of similar and none had an answer that helped so I'm hoping you can help me.

My first question is what is causing the call to be exectued again? We haven't implemented anything like that, the frontend isn't triggering it, when I debug locally with IIS Express I can't reproduce it so I'm assuming it might be an IIS 8.5 feature but I'm unsure.

The second question is how could I allow for requests to be running that long. I've already tried increasing httpRuntime executionTimeout and aspNetCore requestTimeout. I've also tried to increase the timeout of the Web Site in IIS and changed some settings of the Application Pool. Another thing I tried was to change the hostingModel from InProcess to OutOfProcess. Nothing changed the behavior I've described.

Any help would be greatly appreciated.

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,207 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,931 Reputation points
    2023-05-24T17:17:45.8233333+00:00

    15 minutes is too long. you should change to a background request, and polling for the response, or use websocket which supports long connections.