I have an IIS 7 machine with multiple apps/vdirs on the single default
web site. I would like to set two of them with this authentication:
anonymous – off
impersonation – on
forms auth – off
windows auth – on
I would like to do this with appcmd.exe but cannot seem to get the
syntax down right. Has anyone had luck with this?
Thanks.
You should try Configuration Editor (included in IIS 7.5 and available for download for IIS 7.0 at http://www.iis.net/download/AdministrationPack), it can generate the AppCmd.exe commands automatically as well as javascript and managed code. Using it I generated the following (for default web site):
Note that the ones with commit:apphost are because the sections are locked by default which means they need to be set inside ApplicationHost.config using location paths.