## IIS Express Configuration

Using appcmd to manage Visual Studio IIS Express Configuration:

```"C:\Program Files (x86)\IIS Express\appcmd.exe" list site /apphostconfig:"<solution folder>\.vs\config\applicationhost.config"

"C:\Program Files (x86)\IIS Express\appcmd.exe" list config "WcfService1/" /apphostconfig:"<solution folder>\.vs\config\applicationhost.config"

"C:\Program Files (x86)\IIS Express\appcmd.exe" set config "WcfService1" /apphostconfig:"<solution folder>\.vs\config\applicationhost.config" -section:system.webServer/security/authentication/iisClientCertificateMappingAuthentication /+"manyToOneMappings.[name='Contoso Employees',enabled='True',permissionMode='Allow']" /commit:[site,apphost]```

For the last example above, it may be necessary to unlock the section in the applicationhost.config file, depending on where you save the changes:

` <section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Allow" />`

or

```"C:\Program Files (x86)\IIS Express\appcmd.exe" unlock config /apphostconfig:"<solution folder>\.vs\config\applicationhost.config" -section:system.webServer/security/authentication/iisClientCertificateMappingAuthentication /commit:apphost

. "C:\Program Files (x86)\IIS Express\appcmd.exe" unlock config /apphostconfig:"<solution>\.vs\<project>\config\applicationhost.config" -section:system.webServer/security/authentication/windowsAuthentication /commit:apphost

. "C:\Program Files (x86)\IIS Express\appcmd.exe" unlock config /apphostconfig:"<solution>\.vs\<project>\config\applicationhost.config" -section:system.webServer/security/authentication/anonymousAuthentication /commit:apphost

"%systemroot%\system32\inetsrv\appcmd.exe" unlock config "Default Web Site/App" -section:system.webServer/security/authentication/windowsAuthentication /commit:apphost```

For IIS appcmd is located in %systemroot%\system32\inetsrv\

IIS Quick reference: https://blogs.msdn.microsoft.com/mikezh/2012/04/23/iis-appcmd-quick-reference/