TdsSqlServerBrowserOptions Class

Configures the SQL Server Browser responder, which lets clients connect with an instance name (host\INSTANCE).

public sealed class TdsSqlServerBrowserOptions

Remarks

The responder answers the SQL Server Resolution Protocol (MC-SQLR) on a UDP port. Clients send it the instance name and receive the TCP port of the server.

Constructors

NameDescription
TdsSqlServerBrowserOptions()

TdsSqlServerBrowserOptions()

TdsSqlServerBrowserOptions.cs
public TdsSqlServerBrowserOptions()

No documentation is available.

Properties

NameDescription
BindAddressGets or sets the address the UDP socket binds to.
InstanceNameGets or sets the instance name the responder advertises.
PortGets or sets the UDP port to listen on.
ServerNameGets or sets the server name the responder advertises, or null to use Environment.MachineName.

Gets or sets the address the UDP socket binds to.

public IPAddress BindAddress { get; set; }

Property value

IPAddress

Gets or sets the instance name the responder advertises.

public string InstanceName { get; set; }

Property value

string

Remarks

Clients compare it without case sensitivity. It cannot contain a semicolon.

Gets or sets the UDP port to listen on.

public int Port { get; set; }

Property value

int

Remarks

Clients only query TdsSqlServerBrowserOptions.DefaultPort. Use 0 to bind a free port, for example in tests that send the requests themselves.

Gets or sets the server name the responder advertises, or null to use Environment.MachineName.

public string? ServerName { get; set; }

Property value

string?

Constants

NameDescription
DefaultInstanceNameThe instance name of a default SQL Server instance.
DefaultPortThe UDP port of the SQL Server Browser service. Clients always send their requests to this port.

DefaultInstanceName

The instance name of a default SQL Server instance.

public const string DefaultInstanceName = "MSSQLSERVER"

DefaultPort

The UDP port of the SQL Server Browser service. Clients always send their requests to this port.

public const int DefaultPort = 1434