I have a multi-language .Net 4 webforms site (www.example.com/en/, http://www.example.com/fr/ etc.) and each language has a member area, e.g. http://www.example.com/en/members/ and http://www.example.com/fr/members/
A CMS (Umbraco) has control over language branches and content, and therefore has control over adding or removing them. This means that I cannot use the <location> sections in the root web.config to deny anonymous access to each members branch as they may be published after the application has started.
Is there any way to add a ConfigurationLocation section to the Locations property of a System.Configuration.Configuration instance after an application has started, without restarting the application? Alternatively, is there a more flexible way to control path access at runtime?
The solution I used was to create a HttpModule. But with a HttpModule in umbraco, you can not easily retrieve the currentNodeId as this is added as part of a different process.
The module carried out the following checks on the
PostAuthenticateRequestevent:If these two both returned false