Impersonating

Discussion in 'ASP .Net' started by =?Utf-8?B?TGVvbmFyZG8gQXJlbmE=?=, Apr 26, 2006.

  1. 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
     
    =?Utf-8?B?TGVvbmFyZG8gQXJlbmE=?=, Apr 26, 2006
    #1
    1. Advertising

  2. 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
     
    =?Utf-8?B?TGVvbmFyZG8gQXJlbmE=?=, Apr 26, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?TGVvbmFyZG8gQXJlbmE=?=

    Guest

    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.
     
    , Apr 30, 2006
    #3
    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. Jason

    impersonating and LogonUser

    Jason, Dec 30, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    460
    Jim Cheshire [MSFT]
    Jan 5, 2004
  2. Replies:
    4
    Views:
    501
  3. =?Utf-8?B?SW5kZXB0aA==?=
    Replies:
    1
    Views:
    484
    Bruce Barker
    Apr 1, 2005
  4. =?Utf-8?B?QWxpc3RhaXIgTGFjeQ==?=

    Compilation error when impersonating

    =?Utf-8?B?QWxpc3RhaXIgTGFjeQ==?=, Jul 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    561
    Patrice
    Jul 19, 2005
  5. fab
    Replies:
    5
    Views:
    5,290
Loading...

Share This Page