There is not. The token is destroyed by the time the event assembly thread
spins up
Just wondering, why do you need to run the event assembly in the user
context? You should have access to anything you may need since it runs in
the context of the Sharepoint admin account.
-Brad
[quoted text, click to view] "Tamim Sadikli" <TamimSadikli@discussions.microsoft.com> wrote in message
news:06D69FC7-73FD-43CC-86DD-ED676AEBB77B@microsoft.com...
> Under IIS 6.0, ASP.NET Web applications run inside the ASP.NET Worker
Process (aspnet_wp.exe).
>
> When the ASP.NET Worker Process starts a Web application, the Web
application inherits the identity of this worker process (Network Service by
default), or if impersonation is enabled, the Web application runs under the
user account that is authenticated by IIS, or the user account that is
configured in the Web.config file. Fine.
[quoted text, click to view] >
> A document event handler however isn't a web application, it is a class
library used by a web application, (which can be identified within the
MSSharePointPortalAppPool application pool). Consequently the authenticated
token doesn't get passed to it, and it runs under the application pool
identity instead.
[quoted text, click to view] >
> Impersonation is still possible within the event handler, but it has to be
explicitly legislated for at a code-level, by invoking the (unmanaged)
LogonUser(). Implementation of this strategy for a specified user is well
documented, both within MSDN and outside, but I have found no documentation
on how to get hold of the impersonated/authenticated token WITHIN THE EVENT
HANDLER ITSELF.
[quoted text, click to view] >
> One workaround that i have played with is to use SSO to take the user to
the SSO logon form the first time the event is triggered, but the call to
GetCredentialEntryUrl() fails. Can it only be called from within a web part?
If not, is there another way to retrieve the authenticated token from within
the event handler?
[quoted text, click to view] >