Språk

SqlConnectionStringBuilder.TransparentNetworkIPResolution Property

Definition

Caution

TransparentNetworkIPResolution has been deprecated and is only supported on .NET Framework. Use MultiSubnetFailover instead.

On .NET Framework, when the value of this key is set to true, the driver runs multiple connect rounds across the DNS-resolved IP addresses, with progressively larger per-attempt timeouts and a 500 ms minimum on the sequential-mode attempt, until a connection succeeds or the overall Connect Timeout is reached.

public:
 property bool TransparentNetworkIPResolution { bool get(); void set(bool value); };
public bool TransparentNetworkIPResolution { get; set; }
[System.Obsolete("TransparentNetworkIPResolution has been deprecated and is only supported on .NET Framework. Use MultiSubnetFailover instead.")]
public bool TransparentNetworkIPResolution { get; set; }
member this.TransparentNetworkIPResolution : bool with get, set
[<System.Obsolete("TransparentNetworkIPResolution has been deprecated and is only supported on .NET Framework. Use MultiSubnetFailover instead.")>]
member this.TransparentNetworkIPResolution : bool with get, set
Public Property TransparentNetworkIPResolution As Boolean

Property Value

A boolean value.

Attributes

Remarks

This property is obsolete. Use MultiSubnetFailover instead.

If the Multi Subnet Failover key is set to true, Transparent Network IP Resolution is ignored.

If the Failover Partner key is set, Transparent Network IP Resolution is ignored.

On .NET Framework, if TransparentNetworkIPResolution isn't specified in the connection string, the driver automatically disables TNIR when the data source is an Azure SQL endpoint (.database.windows.net, .database.cloudapi.de, .database.usgovcloudapi.net, .database.chinacloudapi.cn, or .database.fabric.microsoft.com), when the Authentication key is set to any Microsoft Entra ID method (Active Directory Password, Active Directory Integrated, Active Directory Interactive, Active Directory Service Principal, Active Directory Device Code Flow, Active Directory Managed Identity, Active Directory MSI, Active Directory Default, or Active Directory Workload Identity), or when the AccessToken or AccessTokenCallback property is set on the SqlConnection. For these automatic conditions, an explicit TransparentNetworkIPResolution value bypasses the automatic behavior: True enables TNIR, and False disables TNIR unconditionally. To restore the automatic behavior, remove the keyword from the connection string.

On .NET (Core, .NET 5+), TransparentNetworkIPResolution isn't a recognized connection-string keyword. Setting it (with any value) throws ArgumentException when the driver parses the connection string.

On .NET Framework, the value of this key must be true, false, yes, or no.

A value of yes is treated the same as a value of true. A value of no is treated the same as a value of false.

Applies to