Configuring IIS sub-directories

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 1 month, 2 weeks ago.

  • Author
    Posts
  • #55412
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    I have been trying to figure out how to configured settings specific to a sub-directory of a web site in IIS. For instance I have an application that has one directory that requires Windows Authentication be enabled. There seems to be a reference to sub-directories in the xWebsiteDefaults resource, but I can't seem to find any documentation on it. I haven't really been able to find anything useful via Google either, though I have a hard time believing that I am the first person trying to do this. Any ideas?

  • #55444
    Profile photo of Don Jones
    Don Jones
    Keymaster

    xWebsite really just applies to the website object itself, rather than child objects. I'm not sure anyone's written a resource to do what you're asking – so you may indeed be the first ;).

  • #55730
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    Haha... perhaps I am. Guess I might have to write my own then.

    The IIS cmdlets are a bit confusing. To turn on Windows auth using the cmdlet's I would run...

    Set-WebConfigurationProperty -Filter "/system.webserver/security/authentication/windowsauthentication" -Name 'enabled' -value 'True' -Location MySite/MyFolder

    Simple enough, but using the get cmdlets Get-WebConfiguration and Get-WebConfigurationProperty I can't see the "enabled" parameter. I can see that it is turned on via the GUI however. I kinda wish the configurations were text based in IIS like in other popular web servers.

  • #55738
    Profile photo of Don Jones
    Don Jones
    Keymaster

    A lot of the configurations are actually in one of the various XML files. You could certainly modify those manually.

You must be logged in to reply to this topic.