asp.net impersonation

Discussion in 'ASP .Net Security' started by Steve, Mar 3, 2008.

  1. Steve

    Steve Guest

    When a Web Service is configured to use windows authentication with no
    impersonation the client can successfully assess the web service.

    web.config that works:
    <system.web>
    <authentication mode="Windows"/>

    <authorization>
    </authorization>
    </system.web>


    When I turn on impersonation and add authorization for user domain
    \web1 I get the error "The request failed with HTTP status 401:
    Unauthorized". User domain\web1 as full access to the web site
    directories.

    web.config that does not work:
    <system.web>
    <authentication mode="Windows"/>
    <identity impersonate="true"/>

    <authorization>
    <deny users="*" />
    <allow users="domain\web1" />
    </authorization>
    </system.web>

    What do I need to do to get impersonation to work?
     
    Steve, Mar 3, 2008
    #1
    1. Advertising

  2. the deny entry should be the last in the authorization element.

    -----
    Dominick Baier (http://www.leastprivilege.com)

    Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

    > When a Web Service is configured to use windows authentication with no
    > impersonation the client can successfully assess the web service.
    >
    > web.config that works:
    > <system.web>
    > <authentication mode="Windows"/>
    > <authorization>
    > </authorization>
    > </system.web>
    > When I turn on impersonation and add authorization for user domain
    > \web1 I get the error "The request failed with HTTP status 401:
    > Unauthorized". User domain\web1 as full access to the web site
    > directories.
    >
    > web.config that does not work:
    > <system.web>
    > <authentication mode="Windows"/>
    > <identity impersonate="true"/>
    > <authorization>
    > <deny users="*" />
    > <allow users="domain\web1" />
    > </authorization>
    > </system.web>
    > What do I need to do to get impersonation to work?
    >
     
    Dominick Baier, Mar 17, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raymond Basque

    Re: ASP.NET Fails after SP4 with Impersonation

    Raymond Basque, Jun 27, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    539
  2. Bassel Tabbara [MSFT]

    RE: ASP.NET Fails after SP4 with Impersonation

    Bassel Tabbara [MSFT], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    517
    Michael Kennedy [UB]
    Jun 28, 2003
  3. Hidulf
    Replies:
    1
    Views:
    462
    Michael Kennedy [UB]
    Jun 30, 2003
  4. Bjoern Wolfgardt

    Re: Impersonation in ASP.Net

    Bjoern Wolfgardt, Jul 21, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    359
    Sanjay Poojari
    Jul 21, 2003
  5. Bjoern Wolfgardt

    Re: Impersonation in ASP.Net

    Bjoern Wolfgardt, Jul 21, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    379
    Jerry
    Aug 8, 2003
Loading...

Share This Page