Export (0) Print
Expand All

_AppDomain.SetThreadPrincipal Method

Set the default principal object to be attached to threads if they attempt to bind to a principal while executing in this application domain.

[Visual Basic]
Sub SetThreadPrincipal( _
   ByVal principal As IPrincipal _
)
[C#]
void SetThreadPrincipal(
   IPrincipal principal
);
[C++]
void SetThreadPrincipal(
   IPrincipal* principal
);
[JScript]
function SetThreadPrincipal(
   principal : IPrincipal
);

Parameters

principal
The principal object to be attached to threads.

Exceptions

Exception Type Condition
ArgumentNullException principal is a null reference (Nothing in Visual Basic).
PolicyException The thread principal has already been set.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

_AppDomain Interface | _AppDomain Members | System Namespace

Show:
© 2014 Microsoft