Car*_*rra 4 .net c# web-services
我的Web配置如下所示:
<system.web>
<compilation debug="false"/>
<httpRuntime executionTimeout="90"/>
</system.web>
Run Code Online (Sandbox Code Playgroud)
这适用于大多数Web服务函数,但是一个函数的查询运行时间很长(5分钟),并且在完成之前将停止.是否可以单独为此Web服务将运行时设置为5分钟?
例如:
MyWebServices.asmx?op=WS_LongMethod --> Timeout of 5 minutes
Run Code Online (Sandbox Code Playgroud)
我已经考虑过运行数据库查询async(fire and forget),但是通过ODBC使用sybase/oracle似乎不可能.
Ric*_*ard 12
是的,你可以这样做.在web.config中,您需要添加一个<location/>元素:
<location path="Path_To_Your_Service.asmx">
<system.web>
<httpRuntime executionTimeout="90"/>
</system.web>
</location>
Run Code Online (Sandbox Code Playgroud)
该<location/>元素为您提供了一种机制,您可以将web.config属性应用于站点中的特定路径.
| 归档时间: |
|
| 查看次数: |
1746 次 |
| 最近记录: |