SqlConnectionEncryptOption Class
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.
These options are used to control encryption behavior of the communication between the server and the client.
public ref class SqlConnectionEncryptOption sealed
public sealed class SqlConnectionEncryptOption
[System.ComponentModel.TypeConverter(typeof(Microsoft.Data.SqlClient.SqlConnectionEncryptOptionConverter))]
public sealed class SqlConnectionEncryptOption
type SqlConnectionEncryptOption = class
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Data.SqlClient.SqlConnectionEncryptOptionConverter))>]
type SqlConnectionEncryptOption = class
Public NotInheritable Class SqlConnectionEncryptOption
- Inheritance
-
SqlConnectionEncryptOption
- Attributes
Implicit conversions have been added to maintain backwards compatibility with boolean behahavior for the Encrypt property. When converting from a boolean, a value of true
converts to Mandatory and a value of false
converts to Optional. When converting to a boolean, Mandatory, Strict , and null
convert to true
and Optional converts false
.
Mandatory |
Specifies that TLS encryption is required when connecting to the server. If the server doesn't support encryption, the connection will fail. |
Optional |
Specifies that TLS encryption is optional when connecting to the server. If the server requires encryption, encryption will be negotiated. |
Strict |
Enables and requires TDS 8.0, TLS encryption to the server. If the server doesn't support TDS 8.0, TLS encryption, the connection will fail. |
Equals(Object) |
Compares the ToString() representation of SqlConnectionEncryptOption to another SqlConnectionEncryptOption. |
Get |
Returns the hash code of the ToString() value. |
Parse(String) |
Converts the specified string representation of a logical value to its SqlConnectionEncryptOption equivalent. |
To |
Returns the string value of SqlConnectionEncryptOption. |
Try |
Converts the specified string representation of a logical value to its SqlConnectionEncryptOption equivalent and returns a value that indicates whether the conversion succeeded. |
Implicit(Boolean to Sql |
Enables implicit converstion of a boolean to a SqlConnectionEncryptOption. A value of |
Implicit(Sql |
Enables implicit converstion of a SqlConnectionEncryptOption to a boolean. Mandatory and Strict convert to |
Produkt | Verzie |
---|---|
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 |