Enabling ASP.NET Impersonation on IIS 7.5 website [Answered]RSS

3 replies

Last post May 06, 2016 07:56 PM by davrion

  • Enabling ASP.NET Impersonation on IIS 7.5 website

    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?

  • Rovastar Rovastar

    5460 Posts

    MVP

    Moderator

    Re: Enabling ASP.NET Impersonation on IIS 7.5 website

    May 05, 2016 03:15 AM|Rovastar|LINK

    What authentication have you set?

    Impersonation is under identity not authentication they are seperate.

    https://msdn.microsoft.com/en-us/library/134ec8tc.aspx
    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Enabling ASP.NET Impersonation on IIS 7.5 website

    May 05, 2016 03:15 AM|Jean Sun|LINK

    Hi,

    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'

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: Enabling ASP.NET Impersonation on IIS 7.5 website

    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