IIS 7 and Above
Enabling ASP.NET Impersonation on IIS 7.5 website
Last post May 06, 2016 07:56 PM by davrion
May 04, 2016 07:54 PM|davrion|LINK
IIS 7.5 on Windows 2008 R2 on a test system
I am working through the steps to configure a new application in our test environment and have all the Powershell commands to configure except for how to enable ASP.NET Impersonation on this website.
I have run the below command, and it runs without any error. But when I check Authentication settings for the site in the console, it still shows as disabled. I have done an iisreset and rebooted but have seen no change.
Set-WebConfigurationProperty -filter system.web/identity -name impersonate -value $true -location $MySite
I haven't had issues configuring the other authentication methods, just this one. What am I missing?
May 05, 2016 03:15 AM|Rovastar|LINK
May 05, 2016 03:15 AM|Jean Sun|LINK
Please check your applicationHost.conifg (%windir%\system32\inetsrv\config) section <location path="$MySite">
The powershell script should added the <identity impersonate="true" /> at this location.
If you want to add this into the web.config, please change the parameter Location to PSPath.
Set-WebConfigurationProperty -filter system.web/identity -name impersonate -value $true -PSPath 'IIS:\sites\$MySite'
May 06, 2016 07:56 PM|davrion|LINK
I had tried using both PSPath and Location as well, but just using PSPath did the trick