SecurityTokenException Constructors

Definition

Initializes a new instance of the SecurityTokenException class.

Overloads

SecurityTokenException()

Initializes a new instance of the SecurityTokenException class.

SecurityTokenException(String)

Initializes a new instance of the SecurityTokenException class using the specified error message.

SecurityTokenException(SerializationInfo, StreamingContext)

Initializes a new instance of the SecurityTokenException class using the specified XML serialization data and contextual data about the source and destination of the serialization stream.

SecurityTokenException(String, Exception)

Initializes a new instance of the SecurityTokenException class using the specified error message and root cause of the error.

SecurityTokenException()

Source:
SecurityTokenException.cs
Source:
SecurityTokenException.cs

Initializes a new instance of the SecurityTokenException class.

C#
public SecurityTokenException();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

SecurityTokenException(String)

Source:
SecurityTokenException.cs
Source:
SecurityTokenException.cs

Initializes a new instance of the SecurityTokenException class using the specified error message.

C#
public SecurityTokenException(string message);

Parameters

message
String

A message that identifies the reason the exception occurred.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

SecurityTokenException(SerializationInfo, StreamingContext)

Source:
SecurityTokenException.cs
Source:
SecurityTokenException.cs

Initializes a new instance of the SecurityTokenException class using the specified XML serialization data and contextual data about the source and destination of the serialization stream.

C#
protected SecurityTokenException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

A SerializationInfo that contains values that are used during serialization and deserialization.

context
StreamingContext

A SecurityTokenException that contains data about the source and destination of the serialization stream.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

SecurityTokenException(String, Exception)

Source:
SecurityTokenException.cs
Source:
SecurityTokenException.cs

Initializes a new instance of the SecurityTokenException class using the specified error message and root cause of the error.

C#
public SecurityTokenException(string message, Exception innerException);

Parameters

message
String

A message that identifies the reason the exception occurred.

innerException
Exception

A Exception that represents the root cause of the exception.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)