在我的应用程序中,我进行了一次服务调用,可能需要 2 分钟才能返回值。 (处理跨多个数据库的发生)。
调用此方法后,应用程序超时。
我在网络配置中设置了以下内容。在 IIS 中托管时仍然出现错误
<system.web>
<compilation debug="true" targetFramework="4.0" />
<sessionState timeout="40"></sessionState>
<httpRuntime maxRequestLength="2147483647" executionTimeout="3600"/>
</system.web>
我也在 service web.config 中设置了相同的执行超时
请帮助我增加申请的超时时间。
最佳答案
您是否尝试过在 httpRuntime 部分设置 shutdownTimeout 值?
空闲应用程序的默认关闭时间为 90 秒。
<httpRuntime maxRequestLength="2147483647" shutdownTimeout="360" executionTimeout="3600"/>
MSDN引用:
HttpRuntimeSection.ShutdownTimeout Property
关于c# - 增加 asp.net 应用程序的应用程序超时,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16273192/