For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > April 2006 > Impersonating









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Impersonating
Leonardo Arena

2006-04-26, 8:04 am

We have an Index Server on Win2k Server SP4 indexing about 250.000 docs.
We have written an ASP.NET serch page, setup a new virtual directory, and
set to use .NET framework 2.0.
On the server is installed also .NET framework 1.0, for the rest of the
Intranet.
The search page is setup to impersonate the user running the query
in order to return only the documents that the user have access to.

However most of the times, after a number of seconds (like 30 or more),
we receive the error message "An error occurred while attempting to
impersonate."
(see error details below)
I've looked around for a time, but I couldn't find any helpful info.

Do you have any ideas?

Thanks in advance.
Best Regards,
Leonardo Arena

--begin error details

SERVER01 2006-04-21 10:28:00 2 3 1309 ASP.NET
2.0.50727.0 Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 4/21/2006 10:27:37 AM
Event time (UTC): 4/21/2006 8:27:37 AM
Event ID: 058697a75b7c4314bfbc926e066b25d8
Event sequence: 116
Event occurrence: 11
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/search-9-127900807847258805
Trust level: Full
Application Virtual Path: /search
Application Path: d:\Inetpub\wwwroot\search Machine name: SERVER01

Process information:
Process ID: 2420
Process name: aspnet_wp.exe
Account name: SERVER01\ASPNET
Exception information:
Exception type: HttpException
Exception message: An error occurred while attempting to impersonate.
Execution of this request cannot continue.

Request information:
Request URL: http://SERVER01/search/index.aspx
Request path: /search/index.aspx
User host address: 10.44.9.144
User: DOMAIN\gdonofrio
Is authenticated: True
Authentication Type: Negotiate
Thread account name: SERVER01\ASPNET

Thread information:
Thread ID: 5
Thread account name: SERVER01\ASPNET
Is impersonating: False
Stack trace: at System.Web.ImpersonationContext.GetCurrentToken()
at System.Web.ImpersonationContext.get_CurrentThreadTokenExists()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
at System.Web.HttpApplication.ResumeSteps(Exception error)
at
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime. ProcessRequestInternal(HttpWorkerRequest
wr)

Custom event details:

-- end error details
Leonardo Arena

2006-04-26, 8:04 am

Incidentally I discovered the cause of the problem.
Index Server had not yet finished to index all documents.
Now that indexing has finished, the error disappeared.

Leonardo

"Leonardo Arena" wrote:

> We have an Index Server on Win2k Server SP4 indexing about 250.000 docs.
> We have written an ASP.NET serch page, setup a new virtual directory, and
> set to use .NET framework 2.0.
> On the server is installed also .NET framework 1.0, for the rest of the
> Intranet.
> The search page is setup to impersonate the user running the query
> in order to return only the documents that the user have access to.
>
> However most of the times, after a number of seconds (like 30 or more),
> we receive the error message "An error occurred while attempting to
> impersonate."
> (see error details below)
> I've looked around for a time, but I couldn't find any helpful info.
>
> Do you have any ideas?
>
> Thanks in advance.
> Best Regards,
> Leonardo Arena
>
> --begin error details
>
> SERVER01 2006-04-21 10:28:00 2 3 1309 ASP.NET
> 2.0.50727.0 Event code: 3005
> Event message: An unhandled exception has occurred.
> Event time: 4/21/2006 10:27:37 AM
> Event time (UTC): 4/21/2006 8:27:37 AM
> Event ID: 058697a75b7c4314bfbc926e066b25d8
> Event sequence: 116
> Event occurrence: 11
> Event detail code: 0
>
> Application information:
> Application domain: /LM/W3SVC/1/Root/search-9-127900807847258805
> Trust level: Full
> Application Virtual Path: /search
> Application Path: d:\Inetpub\wwwroot\search Machine name: SERVER01
>
> Process information:
> Process ID: 2420
> Process name: aspnet_wp.exe
> Account name: SERVER01\ASPNET
> Exception information:
> Exception type: HttpException
> Exception message: An error occurred while attempting to impersonate.
> Execution of this request cannot continue.
>
> Request information:
> Request URL: http://SERVER01/search/index.aspx
> Request path: /search/index.aspx
> User host address: 10.44.9.144
> User: DOMAIN\gdonofrio
> Is authenticated: True
> Authentication Type: Negotiate
> Thread account name: SERVER01\ASPNET
>
> Thread information:
> Thread ID: 5
> Thread account name: SERVER01\ASPNET
> Is impersonating: False
> Stack trace: at System.Web.ImpersonationContext.GetCurrentToken()
> at System.Web.ImpersonationContext.get_CurrentThreadTokenExists()
> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously)
> at System.Web.HttpApplication.ResumeSteps(Exception error)
> at
> System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
> at System.Web.HttpRuntime. ProcessRequestInternal(HttpWorkerRequest
wr)
>
> Custom event details:
>
> -- end error details

prabhupr@hotmail.com

2006-04-29, 10:03 pm

Hi Leonardo

Is there anyway you can share your ASP(x) source code which does the
Search.
If you could also let me know "How to/What to" setupon Index Server
that would be great, I have a similar requirement and dont know how to
do it though.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com