SecurityContext.CreateCopy Method ()


Creates a copy of the current security context.

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

public SecurityContext CreateCopy()

Return Value

Type: System.Security.SecurityContext

The security context for the current thread.

Exception Condition

The current security context has been previously used, was marshaled across application domains, or was not acquired through the Capture method.

The current context must have been acquired through a capture or a copy operation. This method is useful for applying a captured SecurityContext to multiple threads.

.NET Framework
Available since 2.0
Return to top