Sql Server 2005 is only available in ASP.NET 1.1 when I specify protocol and port
My company is currently migrating some of their really old db's to sql 2005 server. Some legacy applications have problems connecting to the new server. The connection string works in Asp.NET 2.0, probably because it automatically accepts tcp: 1433.
I need to build a connection string like this in ASP.NET 1.1 for it to work:
"Server=tcp:my.server.com,1433;..."
Without a protocol and port, the connection fails ("Wrong connection")
TCP 1433 and UDP 1434 are open on our firewall. In SQL Server 2005, remote access is enabled because TCPIP, the SQL Browser service is running, I am using the correct login credentials.
Any ideas why I can't just give the server name without protocol and port number?
source to share
IIRC SQL Server 2005 finds any old port available by default. On my laptop, this means port 1212.
To force install it to a specific port, you have to go to Start-> Programs-> SQL Server 2005-> Configuration Tools-> SQL Server Configuration Manager
Here you have to go to SQL Server 2005 Network Configuration-> Protocols for (service name) → Right click on TCP / IP-> Properties-> Select "IP Address" tab and set for TCP dynamic ports.
For some reason "0" means "Yes, use dynamic ports" and (ie there is no entry in the field) "No, I will specify it myself"
Then fill in the TCP port 1433 field.
Do this in all listed adapters and restart the SQL service.
Now you can check if the service is actually on the right port by running the following
Start-> Run-> cmd.exe
C:> netstat -ano
find an entry like this
local address <stuff> PID
0.0.0.0:1433 <some number>
Now let's do C:> Tasklist
and find the problem with the number above. This task should be named something like sqlsrvr.exe.
source to share