Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Creating location - locking programmatically

$
0
0

in the file applicationHost.config I can see the following structure:

<location path="Default FTP Site/foo">
        <system.ftpServer>
            <security>
                <authorization>
                    <add accessType="Allow" users="foo" roles="" permissions="Read, Write" />
                </authorization>
            </security>
        </system.ftpServer>
    </location>

I have now for the last day tried to add this section programmatically, but I am not able to do so. WHen I loop over the root sections I get system.applicationHost, system.webServer and system.ftpServer

I believe running the RootSectionGroup is looking at the information found here:

<configSections>
        <sectionGroup name="system.applicationHost">...</sectionGroup>

....

</configSections>

Doing more searching, I belive this section has something todo with locking.

I found this article here:How to Use Locking in IIS 7.0 Configuration (http://www.iis.net/learn/get-started/planning-for-security/how-to-use-locking-in-iis-configuration)

The page above does not show how to do this programmatically.

Am I missing the obvious in the IIS Microsoft.Web.Administration api, or ... ???


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>