SqlConnectionStringBuilder.TransparentNetworkIPResolution Property

Definition

将该键的值设置为 true 时,需要应用程序检索特定 DNS 条目的所有 IP 地址并尝试连接到列表中的第一个地址。When the value of this key is set to true, the application is required to retrieve all IP addresses for a particular DNS entry and attempt to connect with the first one in the list. 如果未在 0.5 秒内建立连接,应用程序将尝试并行连接到所有其他地址。If the connection is not established within 0.5 seconds, the application will try to connect to all others in parallel. 第一个地址响应后,应用程序将与响应的 IP 地址建立连接。When the first answers, the application will establish the connection with the respondent IP address.

public:
 property bool TransparentNetworkIPResolution { bool get(); void set(bool value); };
public bool TransparentNetworkIPResolution { get; set; }
member this.TransparentNetworkIPResolution : bool with get, set
Public Property TransparentNetworkIPResolution As Boolean

Property Value

Boolean

布尔值。A boolean value.

Remarks

如果 MultiSubnetFailover 项设置为 true,则将忽略 TransparentNetworkIPResolutionIf the MultiSubnetFailover key is set to true, TransparentNetworkIPResolution is ignored.

如果设置了 Failover Partner 项,TransparentNetworkIPResolution 将被忽略。If the Failover Partner key is set, TransparentNetworkIPResolution is ignored.

此项的值必须是 truefalseyesnoThe value of this key must be true, false, yes, or no.

yes 的值与 true的值相同。A value of yes is treated the same as a value of true.

no 的值与 false的值相同。A value of no is treated the same as a value of false.

此密钥默认为在以下情况下 falseThis key defaults to false when:

  • 连接到 Azure SQL 数据库,其中的数据源结尾为:Connecting to Azure SQL Database where the data source ends with:

    • .database.chinacloudapi.cn.database.chinacloudapi.cn

    • .database.usgovcloudapi.net.database.usgovcloudapi.net

    • .database.cloudapi.de.database.cloudapi.de

    • .database.windows.net.database.windows.net

  • Authentication 为 "Active Directory Password" 或 "Active Directory 集成"Authentication is 'Active Directory Password' or 'Active Directory Integrated'

否则,默认为 trueOtherwise it defaults to true.

Applies to