More specifically, we're building an install program for a couple of websites. We only support IIS 7.0 or higher and we're using Microsoft.Web.Administration.
In order to implement AD pass through authentication we have to set Authentication properties on some individual files.
The end result of doing this through IIS Manager is an entry in the ApplicationHost.Config file like this.
<location path="Default Web Site/SmartLynxDataSvc/Trunk/SmartLynxWindowsCredential.svc"> <system.webServer> <security> <authentication> <anonymousAuthentication enabled="false" /> <windowsAuthentication enabled="true" /> </authentication> </security> </system.webServer> </location>
When I try to open a Location section, I get it's missing an element tag or such.
What I plan on doing is using the GetLocalPaths to see if an entry exists. If it doesn't I need to create a new Location Element.
I'd prefer not to resort to open the file with and editing it directly in code and rather use ServerManager if there is a way.
Thanks