Increase Timeout for ASP.NET Core applications

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.

 

  1. <?xml version=“1.0” encoding=“utf-8”?>  
  2. <configuration>  
  3.   
     
  4.   <!– To customize the asp.net core module uncomment and edit the following section.   
  5.   For more info see https://go.microsoft.com/fwlink/?linkid=838655 –>  
  6.     
     
  7.   <system.webServer>  
  8.     <handlers>  
  9.       <remove name=“aspNetCore”/>  
  10.       <add name=“aspNetCore” path=“*” verb=“*” modules=“AspNetCoreModule” resourceType=“Unspecified”/>  
  11.     </handlers>  
  12.     <aspNetCore processPath=“%LAUNCHER_PATH%” arguments=“%LAUNCHER_ARGS%” stdoutLogEnabled=“false” stdoutLogFile=“.\logs\stdout”   
  13.                 requestTimeout=“00:20:00”/>  
  14.   </system.webServer>  
  15.     
     
  16. </configuration>  

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: