ExtendedProtectionPolicy Constructors

Definition

Initializes a new instance of the ExtendedProtectionPolicy class.

Overloads

ExtendedProtectionPolicy(PolicyEnforcement)

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced.

ExtendedProtectionPolicy(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the ExtendedProtectionPolicy class from a SerializationInfo object that contains the required data to populate the ExtendedProtectionPolicy.

ExtendedProtectionPolicy(PolicyEnforcement, ChannelBinding)

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced and the channel binding token (CBT) to be used.

ExtendedProtectionPolicy(PolicyEnforcement, ProtectionScenario, ICollection)

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced, the kind of protection enforced by the policy, and a custom Service Provider Name (SPN) list that is used to match against a client's SPN.

ExtendedProtectionPolicy(PolicyEnforcement, ProtectionScenario, ServiceNameCollection)

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced, the kind of protection enforced by the policy, and a custom Service Provider Name (SPN) list that is used to match against a client's SPN.

ExtendedProtectionPolicy(PolicyEnforcement)

Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced.

C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement);

Parameters

policyEnforcement
PolicyEnforcement

A PolicyEnforcement value that indicates when the extended protection policy should be enforced.

Remarks

When this constructor is used to initialize a new instance of the ExtendedProtectionPolicy class, the PolicyEnforcement property is set to the policyEnforcement parameter and the ProtectionScenario property is set to TransportSelected.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 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, 2.1

ExtendedProtectionPolicy(SerializationInfo, StreamingContext)

Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initializes a new instance of the ExtendedProtectionPolicy class from a SerializationInfo object that contains the required data to populate the ExtendedProtectionPolicy.

C#
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
C#
protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

A SerializationInfo instance that contains the information that is required to serialize the new ExtendedProtectionPolicy instance.

context
StreamingContext

A StreamingContext that contains the source of the serialized stream that is associated with the new ExtendedProtectionPolicy instance.

Attributes

Remarks

This constructor implements the System.Runtime.Serialization.ISerializable interface for the ExtendedProtectionPolicy class.

The ISerializable.GetObjectData method can be used to serialize an ExtendedProtectionPolicy object. This serialized object can then be used with ExtendedProtectionPolicy(SerializationInfo, StreamingContext) to construct a new ExtendedProtectionPolicy object.

See also

Applies to

.NET 10 and other versions
Product Versions (Obsolete)
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 (8, 9, 10)
.NET Framework 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, 2.1

ExtendedProtectionPolicy(PolicyEnforcement, ChannelBinding)

Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced and the channel binding token (CBT) to be used.

C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ChannelBinding customChannelBinding);

Parameters

policyEnforcement
PolicyEnforcement

A PolicyEnforcement value that indicates when the extended protection policy should be enforced.

customChannelBinding
ChannelBinding

A ChannelBinding that contains a custom channel binding to use for validation.

Exceptions

policyEnforcement is specified as Never.

customChannelBinding is null.

Remarks

When this constructor is used to initialize a new instance of the ExtendedProtectionPolicy class, the PolicyEnforcement property is set to the policyEnforcement parameter, the CustomChannelBinding property is set to the customChannelBinding parameter, and the ProtectionScenario property is set to TransportSelected.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 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, 2.1

ExtendedProtectionPolicy(PolicyEnforcement, ProtectionScenario, ICollection)

Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced, the kind of protection enforced by the policy, and a custom Service Provider Name (SPN) list that is used to match against a client's SPN.

C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Collections.ICollection? customServiceNames);
C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Collections.ICollection customServiceNames);

Parameters

policyEnforcement
PolicyEnforcement

A PolicyEnforcement value that indicates when the extended protection policy should be enforced.

protectionScenario
ProtectionScenario

A ProtectionScenario value that indicates the kind of protection enforced by the policy.

customServiceNames
ICollection

A ICollection that contains the custom SPN list that is used to match against a client's SPN.

Exceptions

policyEnforcement is specified as Never.

customServiceNames is null or an empty list.

Remarks

When this constructor is used to initialize a new instance of the ExtendedProtectionPolicy class, the PolicyEnforcement property is set to the policyEnforcement parameter, the ProtectionScenario property is set to the protectionScenario parameter, and the CustomServiceNames property is set to the customServiceNames parameter.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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, 2.1

ExtendedProtectionPolicy(PolicyEnforcement, ProtectionScenario, ServiceNameCollection)

Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs
Source:
ExtendedProtectionPolicy.cs

Initializes a new instance of the ExtendedProtectionPolicy class that specifies when the extended protection policy should be enforced, the kind of protection enforced by the policy, and a custom Service Provider Name (SPN) list that is used to match against a client's SPN.

C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Security.Authentication.ExtendedProtection.ServiceNameCollection? customServiceNames);
C#
public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Security.Authentication.ExtendedProtection.ServiceNameCollection customServiceNames);

Parameters

policyEnforcement
PolicyEnforcement

A PolicyEnforcement value that indicates when the extended protection policy should be enforced.

protectionScenario
ProtectionScenario

A ProtectionScenario value that indicates the kind of protection enforced by the policy.

customServiceNames
ServiceNameCollection

A ServiceNameCollection that contains the custom SPN list that is used to match against a client's SPN.

Exceptions

policyEnforcement is specified as Never.

customServiceNames is null or an empty list.

Remarks

When this constructor is used to initialize a new instance of the ExtendedProtectionPolicy class, the PolicyEnforcement property is set to the policyEnforcement parameter, the ProtectionScenario property is set to the protectionScenario parameter, and the CustomServiceNames property is set to the customServiceNames parameter.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 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, 2.1