Reputation: 61646
I have the following in my web.config:
<configuration>
<system.web>
<httpRuntime executionTimeout="180"/>
</system.web>
</configuration>
Is there a .NET built-in way to retrieve executionTimeout
value? Perhaps via ConfigurationManager set of objects? I don't see anything obvious.
Upvotes: 0
Views: 341
Reputation: 31270
Any section can be retrieved from using GetSection
var httpRuntimeSection = ConfigurationManager.GetSection("system.web/httpRuntime") as
HttpRuntimeSection;
//httpRuntimeSection.ExecutionTimeout
In Web app we could use WebConfigurationManager that also has similar API - GetSection
ConfigurationManager vs. WebConfigurationManager
Upvotes: 5