Kjensen
Kjensen

Reputation: 12384

Forcing ASP.Net to use TCP/IP to connect to SQL Server instead of named pipes

How can I force my ASP.Net application to connect to a SQL Server using TCP/IP, not Named Pipes?

I read somewhere putting "tcp:" in front of the server name in the connectionstring should do the trick, but it does not seem to change anything.

Edit1:

Edit2:

Upvotes: 11

Views: 19190

Answers (4)

Sean Haddy
Sean Haddy

Reputation: 1666

Just to add a quick hint, could cause issues, if you need to specify a port, do it after the IP address, and use a comma, not a colon.

Upvotes: 0

Hardwareguy
Hardwareguy

Reputation: 2981

You can force it in the connection string:

server=tcp:hostname

Via: http://weblogs.asp.net/jgalloway/archive/2007/02/24/sql-force-the-protocol-tcp-named-pipes-etc-in-your-connection-string.aspx

Upvotes: 26

David McEwing
David McEwing

Reputation: 3340

Use the SQL Server Configuration Manager on the client and disable the client protocols you don't want it to use.

Upvotes: 4

ggponti
ggponti

Reputation: 395

It depends how you're connecting to the database, but this should give the information you need.

Upvotes: 0

Related Questions