Dienstag, 4. November 2008

Lösung zum zeitweiligen Benutzerwechsel innerhalb einer Webanwendung

System.Security.Principal.WindowsImpersonationContext impersonationContext;
impersonationContext =
((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();

//Insert your code that runs under the security context of the authenticating user here.

impersonationContext.Undo();
LINK

Keine Kommentare: