I'm trying to get the timeout value in the following from web.config:
<!-- Majority of xml left out for brevity -->
<configuration>
<configSections>...</configSections>
<system.diagnostics>...</system.diagnostics>
<system.web>
<authentication mode="Forms">
<forms timeout="1" /> <!-- Trying to get this value -->
</authentication>
</system.web>
</authentication>
</configuration>
I'm using this C# code to start off with. My goal is to first access system.web:
var value = ConfigurationManager.GetSection("configSections"); // null
var value1 = ConfigurationManager.GetSection("system.diagnostics"); // SystemDiagnosticsSection
var value2 = ConfigurationManager.GetSection("system.web"); // null
value and value2 are both null, but value1 is an instance of SystemDiagnosticsSection.
Why can I access system.diagnostics but not system.web?