Recently we came across a situation where in we had to increase the timeout of a aspnet web application, by default an aspnet core project does not generate a web.config file and did not find enough documentation on how to modify the appsetting.json file.
Google always ended up showing on how to do that in a web.config, which we did not have. After playing around we found that we could add a web.config to the solution
And add the following, there might be better ways of doing it, but wonder why Visual Studio (using 2017) does not add a web.config file automatically ?? maybe another blog post.
-
<?xml version=“1.0” encoding=“utf-8”?>
-
<configuration>
-
-
<!– To customize the asp.net core module uncomment and edit the following section.
-
For more info see https://go.microsoft.com/fwlink/?linkid=838655 –>
-
-
<system.webServer>
-
<handlers>
-
<remove name=“aspNetCore”/>
-
<add name=“aspNetCore” path=“*” verb=“*” modules=“AspNetCoreModule” resourceType=“Unspecified”/>
-
</handlers>
-
<aspNetCore processPath=“%LAUNCHER_PATH%” arguments=“%LAUNCHER_ARGS%” stdoutLogEnabled=“false” stdoutLogFile=“.\logs\stdout”
-
requestTimeout=“00:20:00”/>
-
</system.webServer>
-
-
</configuration>