Hi!
I'm trying to use the Microsoft.Web.Administration API to access the 'system.webServer/security/authorization' section (at the current request path) to see if anonymous users ("*") can access.
To do that i'm trying to access the section configuration by:
WebConfigurationManager.GetSection(HttpContext.Current, "system.webServer/security/authorization")
I tried that on a path whose web.config is restricting the access to a specific role, like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<authorization>
<remove users="*" roles="" verbs="" />
<add accessType="Allow" roles="MyRole" />
</authorization>
</security>
</system.webServer>
</configuration>
For my surprise, the returned object is a ConfigurationSection instance with zero ChildElements.
Why is that?
Thanks in advance.