SqlConnectionStringBuilder.TransparentNetworkIPResolution 属性

定义

将该键的值设置为 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

属性值

Boolean

布尔值。A boolean value.

注解

如果 MultiSubnetFailover 该键设置为 trueTransparentNetworkIPResolution 则将被忽略。If the MultiSubnetFailover key is set to true, TransparentNetworkIPResolution is ignored.

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

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

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

的值与的 no 值相同 falseA 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.

适用于