SqlConnection.SspiContextProvider Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the SspiContextProvider instance for customizing the SSPI context. If not set, the default for the platform will be used.
public:
property Microsoft::Data::SqlClient::SspiContextProvider ^ SspiContextProvider { Microsoft::Data::SqlClient::SspiContextProvider ^ get(); void set(Microsoft::Data::SqlClient::SspiContextProvider ^ value); };
public Microsoft.Data.SqlClient.SspiContextProvider SspiContextProvider { get; set; }
member this.SspiContextProvider : Microsoft.Data.SqlClient.SspiContextProvider with get, set
Public Property SspiContextProvider As SspiContextProvider
Property Value
An SspiContextProvider instance.
Exceptions
The SspiContextProvider is set while the AccessToken or AccessTokenCallback property is already set, or the connection is open.
Remarks
The SspiContextProvider is a part of the connection pool key. Care should be taken when using this property to ensure the implementation returns a stable identity per resource.
SSPI is an alternative to token-based authentication, so this property is mutually exclusive with the AccessToken and AccessTokenCallback properties. Setting this property when either of those is already set throws InvalidOperationException, and setting either of those while this property is set throws as well. Assigning null clears the property and never throws.