Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SecurityTokenHandlerCollection::WriteToken Method (SecurityToken^)

.NET Framework (current version)
 

Serializes the specified security token to a string.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public:
String^ WriteToken(
	SecurityToken^ token
)

Parameters

token
Type: System.IdentityModel.Tokens::SecurityToken^

The token to serialize.

Return Value

Type: System::String^

The string serialized from the token.

Exception Condition
ArgumentNullException

token is null.

InvalidOperationException

The collection does not contain a handler capable of serializing the specified token.

.NET Framework
Available since 4.5
Return to top
Show:
© 2017 Microsoft