SqlConnectionStringBuilder.ServerSPN Property
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 service principal name (SPN) of the data source.
public:
property System::String ^ ServerSPN { System::String ^ get(); void set(System::String ^ value); };
C#
public string ServerSPN { get; set; }
member this.ServerSPN : string with get, set
Public Property ServerSPN As String
The value of the ServerSPN property, or String.Empty
if none has been supplied.
This property corresponds to the "ServerSPN" and "Server SPN" keys within the connection string.
Note
This property only applies when using Integrated Security mode, otherwise it is ignored.
Product | Versions |
---|---|
SqlClient .NET Core | 5.0, 5.1, 5.2 |
SqlClient .NET Framework | 5.0, 5.1, 5.2 |
SqlClient .NET Standard | 5.0, 5.1, 5.2 |