Undo Method
Collapse the table of content
Expand the table of content

WindowsImpersonationContext.Undo Method ()

 

Reverts the user context to the Windows user represented by this object.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

member Undo : unit -> unit

Exception Condition
SecurityException

An attempt is made to use this method for any purpose other than to revert identity to self.

Notes to Implementers:

Because Microsoft Windows 98 and Windows Millennium Edition platforms do not have users or user tokens, impersonation cannot take place on those platforms.

The following example shows how to impersonate a Windows identity using a specified user token.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft