2

i'm getting 502.3 error from my asp.net core application [long requests] and from answers: Timeouts with long running ASP.NET MVC Core Controller HTTPPost Method and Request timeout from ASP.NET Core app on IIS i see that i need to extend timeouts but every answer contains setting timeouts in webconfig xml file and i'm using json file for my configuration.

    {
  "AppConfig": {
    "Name": "...",
    "ConnectionString": "Server=localhost;User Id=root;Password=....;Database=....",
  }

I also have a launchSettings.json

    {
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:53573/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "SPS.Services": {
      "commandName": "Project"
    }
  }
}

How should equivalent look like from xml:

   <system.webServer>
     <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
        </handlers>
        <aspNetCore requestTimeout="00:20:00"  processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
    </system.webServer>

and where should i put it?

I'm using AspNetCore 1.1.2

2 Answers 2

0

If you run your app "behind" IIS (you do, according to launchSettings), then you must make sure all items in chain (IIS, IIS/AspNetCore module that calls Kestrel and Kestrel itself) are not kill long-running requests.

Kestrel does not have any request timeouts, nothing to configure.

For configuring IIS-related stuff, you should still use web.config, because IIS knows nothing about your json files. So feel free to create and modify web.config file using links you provided.

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same problem, and the only way to solve it was creating a web.config file for my application. So I now have the appsettings.json plus the web.config.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.