Configure requestTimeout in code

Asked

Viewed 41 times

0

I got a 502 error, and after much searching I saw that increasing the requestTimeout the problem would work. But I can only increase directly in web.config, thus adding to the line:

      <aspNetCore processPath="dotnet" arguments=".\Erp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" requestTimeout="360:00:00" />

I would like to know if there is any way to configure directly in the code, in the project, for when publish is already configured, if not every time I publish, I have to go to web.config and change the values.

1 answer

0

According to Dmitry Pavlov at Stackoverflow.com:

No, there is no way to do this as you described. But according to the documentation, you can just add web.config to your project and specify this (and another) configuration value:

If a file web.config not present in the project, the archive will be created with the processPath and the right arguments to configure the ASP.NET Core Module and moved to the published output.

If a file web.config be present in the project, the archive will be transformed with the processPath and the right arguments for configure the ASP.NET Core Module and be moved to the published output. The transformation does not modify the IIS settings in the file.

The archive web.config can provide additional settings of IIS that control the active modules of the IIS. For information on modules of the IIS that are able to process requests with ASP.NET Core applications, see the module topic of IIS.

To prevent the web SDK from transforming the file web.config, use the property IsTransformWebConfigDisabled in the project file.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.