Thursday, October 19, 2017

SQL Server TCP and UDP Ports

SQL Server has evolved from a simple relational database engine to a multipurpose enterprise-level data platform. The subsystems and features that Microsoft has added—and continues to add—to SQL Server have significantly increased the network connections that the platform uses. Sometime it's tricky to figure out which firewall ports to open for each SQL Server feature. To help you, here's a rundown of commonly used SQL Server network ports.

TCP 1433

TCP port 1433 is the default port for SQL Server. This port is also the official Internet Assigned Number Authority (IANA) socket number for SQL Server. Client systems use TCP 1433 to connect to the database engine; SQL Server Management Studio (SSMS) uses the port to manage SQL Server instances across the network. You can reconfigure SQL Server to listen on a different port, but 1433 is by far the most common implementation.

TCP 1434

TCP port 1434 is the default port for the Dedicated Admin Connection. You can start the Dedicated Admin Connection through sqlcmd or by typing ADMIN: followed by the server name in the SSMS Connect to Database Engine dialog box.

UDP 1434

UDP port 1434 is used for SQL Server named instances. The SQL Server Browser service listens on this port for incoming connections to a named instance. The service then responds to the client with the TCP port number for the requested named instance.

TCP 2383

TCP port 2383 is the default port for SQL Server Analysis Services.

TCP 2382

TCP port 2382 is used for connection requests to a named instance of Analysis Services. Much like the SQL Server Browser service does for the relational database engine on UDP 1434, the SQL Server Browser listens on TCP 2382 for requests for Analysis Services named instances. Analysis Services then redirects the request to the appropriate port for the named instance.

TCP 135

TCP port 135 has several uses. The Transact-SQL debugger uses the port. TCP 135 is also used to start, stop, and control SQL Server Integration Services, although it is required only if you connect to a remote instance of the service from SSMS.

TCP 80 and 443

TCP ports 80 and 443 are most typically used for report server access. However, they also support URL requests to SQL Server and Analysis Services. TCP 80 is the standard port for HTTP connections that use a URL. TCP 443 is used for HTTPS connections that use secure sockets layer (SSL).

Unofficial TCP Ports

Microsoft uses TCP port 4022 for SQL Server Service Broker examples in SQL Server Books Online. Likewise, BOL Database Mirroring examples use TCP port 7022.

This summary should cover your most pressing port needs. You can find more detailed information about the TCP and UDP ports that SQL Server uses in the Microsoft article "Configure the Windows Firewall to Allow SQL Server Access."

Tuesday, October 3, 2017

VS 2013 debugger IIS Server Variable AUTH_USER blank

Question:
VS 2012 project, using asp.net development debugger shows AUTH_USER alias. VS 2013 project site, server variable AUTH_USER is blank. VS 2012 had simple Use VS Dev. server, auto-assign port. VS 2013 New options, completely new stuff. Where are the step by step instructions on what needs to be setup or configured to get this functionality back.

Cause:
VS2012: If I change the setting: Properties->Web->Servers
to : Use Visual Studio Development Server
It will show that variable value
VS2013: It doesn't have the option"Use Visual Studio Development Server"
You could refer to this thread.
According to this feedback, we have removed the Visual Studio Development Server from Visual Studio 2013, switching instead to IIS Express as the default development server.

Solution:
In Visual Studio use File -> Open to edit %userprofile%\documents\IISExpress\config\applicationhost.config.

the file in my computer is: C:\Users\Redirection\yous2\Documents\IISExpress\config\applicationhost.config.
Change the following lines to these values:


 


IIS Express should now use the same authentication settings as those that came standard with the Visual Studio 2012 Development Server.