T
techfuzz
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>
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>