My web configuration looks as follows:
<system.web>
<compilation debug="false"/>
<httpRuntime executionTimeout="90"/>
</system.web>
This is fine for most webservice functions but one function has a query that is running a very long (5 minutes) time and will be stopped before it has finished. Is it possible to set the runtime to 5 minutes for this webservice alone?
E.g.:
MyWebServices.asmx?op=WS_LongMethod --> Timeout of 5 minutes
I've thought about running the database query async (fire and forget) but it doesn't seem possible with sybase/oracle through ODBC.
Yes, you can do that. In the web.config, you'll need to add a <location/>
element:
<location path="Path_To_Your_Service.asmx">
<system.web>
<httpRuntime executionTimeout="90"/>
</system.web>
</location>
The <location/>
element gives you a mechanism whereby you can apply web.config attributes to specific paths within your site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With