Impersonation failure with Index Server and Forms Authentication with Active Directory

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Impersonation failure with Index Server and Forms Authentication with Active Directory

    I'm posting my problem experience and solution I found here for other
    ASP.NET developers.

    I have a web application that uses Forms Authentication with Active
    Directory to control access. In this web application, I have search
    page that utilizes the Windows Indexing Service (MSIDXS provider).
    For reasons I'm not aware of at this time, setting <identity
    impersonation="true" /> in the web.config causes an error whenever you
    try to search.

    This is the error message: HttpException (0x80004005): Impersonation
    failure.

    The only information I was able to find was another thread in the
    microsoft.public.inetserver.indexserver newsgroup titled
    "Impersonation Discoveries with .NET Framework" which steered me in
    the right direction. SteveC, the owner of the other thread, said he
    was able to fix the search by setting the impersonation to false but
    other things broke probably because of his authentication method and
    not being able to read the file ACL's.

    Mine solution is a little different from his, I kept the overall
    application's identity impersonation set to true as was originally how
    I was configured, but then set the impersonation to false only for my
    search.aspx page. Here's a snippet of my web.config for you with
    commented notes.

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>

    <!-- I added this location node -->
    <location allowOverride="true" />
    <!-- End location node -->

    <system.web>
    <authentication mode="Forms">
    <forms loginUrl="logon.aspx" name="adAuthCookie" timeout="60"
    path="/" >
    </forms>
    </authentication>

    <!-- I left this impersonate alone -->
    <identity impersonate="true" />

    </system.web>

    <!-- I added this location node -->
    <location path="search.aspx">
    <system.web>
    <identity impersonate="false" />
    </system.web>
    </location>
    <!-- End location node -->

    </configuration>
    techfuzz Guest

  2. Similar Questions and Discussions

    1. Asp.Net Forms authentication using Active Directory
      Hi. I am using forms authentication in ASP.Net against Active Directory. I have followed the example provided by Microsoft. Here is my problem....
    2. Impersonation of forms-authenticated Active Directory user
      Hello all I wonder if the great and the good of this esteemed forum might shed some light on a problem of mine... Three servers in a domain:...
    3. Forms Authentication with Active Directory using vb.net
      I have seen many examples of form authentication using c#. Can someone point me to a sample using vb.net. I would like to use WinNT://domain,...
    4. Forms or windows authentication with active directory?
      Hi, I'm having a hard time deciding (figuring out) how to implement security in my asp.net application. Requirements: - Use active directory as...
    5. Username not logged in IIS when using forms authentication with Active Directory
      Hi! I've succesfully implemented Forms Authentication with a Active Directory, described at...
  3. #2

    Default RE: Impersonation failure with Index Server and Forms Authentication with Active Directory

    Hello,

    Thanks very much for your post. It benefits the whole group very much.

    It seems that this problem likes the one mentioned in:
    "FIX: "Access Is Denied" Error Message When You Try to Access Indexing Service from ASP.NET with Impersonation
    Enabled"
    [url]http://support.microsoft.com/?id=323293[/url]

    The workaround is also the same.

    Best regards,
    Yanhong Huang
    Microsoft Online Partner Support

    Get Secure! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !From: [email]cruegseg@heery.com[/email] (techfuzz)
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !Subject: Impersonation failure with Index Server and Forms Authentication with Active Directory
    !Date: 8 Aug 2003 10:21:00 -0700
    !Organization: [url]http://groups.google.com/[/url]
    !Lines: 55
    !Message-ID: <639a482f.0308080921.77f21448@posting.google.com >
    !NNTP-Posting-Host: 67.96.192.158
    !Content-Type: text/plain; charset=ISO-8859-1
    !Content-Transfer-Encoding: 8bit
    !X-Trace: posting.google.com 1060363261 9983 127.0.0.1 (8 Aug 2003 17:21:01 GMT)
    !X-Complaints-To: [email]groups-abuse@google.com[/email]
    !NNTP-Posting-Date: 8 Aug 2003 17:21:01 GMT
    !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!
    news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!postnews1.google.com!not-for-mail
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:166191
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !I'm posting my problem experience and solution I found here for other
    !ASP.NET developers.
    !
    !I have a web application that uses Forms Authentication with Active
    !Directory to control access. In this web application, I have search
    !page that utilizes the Windows Indexing Service (MSIDXS provider).
    !For reasons I'm not aware of at this time, setting <identity
    !impersonation="true" /> in the web.config causes an error whenever you
    !try to search.
    !
    !This is the error message: HttpException (0x80004005): Impersonation
    !failure.
    !
    !The only information I was able to find was another thread in the
    !microsoft.public.inetserver.indexserver newsgroup titled
    !"Impersonation Discoveries with .NET Framework" which steered me in
    !the right direction. SteveC, the owner of the other thread, said he
    !was able to fix the search by setting the impersonation to false but
    !other things broke probably because of his authentication method and
    !not being able to read the file ACL's.
    !
    !Mine solution is a little different from his, I kept the overall
    !application's identity impersonation set to true as was originally how
    !I was configured, but then set the impersonation to false only for my
    !search.aspx page. Here's a snippet of my web.config for you with
    !commented notes.
    !
    !<?xml version="1.0" encoding="utf-8" ?>
    !<configuration>
    !
    !<!-- I added this location node -->
    ! <location allowOverride="true" />
    !<!-- End location node -->
    !
    ! <system.web>
    ! <authentication mode="Forms">
    ! <forms loginUrl="logon.aspx" name="adAuthCookie" timeout="60"
    !path="/" >
    ! </forms>
    ! </authentication>
    !
    !<!-- I left this impersonate alone -->
    ! <identity impersonate="true" />
    !
    ! </system.web>
    !
    !<!-- I added this location node -->
    ! <location path="search.aspx">
    ! <system.web>
    ! <identity impersonate="false" />
    ! </system.web>
    ! </location>
    !<!-- End location node -->
    !
    !</configuration>
    !


    Yan-Hong Huang[MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139