Re: Why do I have to enable File and Printer sharing to connect through the XP firewall?



Perhaps the connection is made using Named Pipes? I'd use cliconfg.exe on the client to verify that TCP/IP (sockets) is selected higher than Named Pipes. Sockets shouldn't require anything else but the TCP port. Unless you are trying a Windows logins, of course. Also, since you specify the port in your connection string, you shouldn't need the SQL Server browser service on the server (unless it is needed for other purposes, of course).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Keith" <keith@xxxxxxx> wrote in message news:ehaTWA$8HHA.3940@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

I have a client app that connects to a remote instance of SQL Server 2005 Express. The client uses the SQL Browser to locate available SQL instances.

The SQL instance has Shared Memory, Named Pipes, and TCP/IP turned on, and TCP/IP is configured to use a static port (5721).

The firewall on the SQL machine has the following exceptions: 1434 UDP (SQL Browser) and 5721 TCP (SQL Server).

I have no problems locating the SQL instance using Management Studio or with the SQL Browser in my client. However, I cannot connect either with Management Studio or my client unless I also turn on the "File and Printer Sharing" exception in the firewall. The BOL says that File and Printer Sharing is required if using Named Pipes through the firewall, but I don't understand where Named Pipes are being used when I try to connect.

In my client (C# app) I'm using the SQLConnection class with a very vanilla connection string; the only addition the the port number of the SQL instance.

Is SQLConnection using Named Pipes behind the scenes? Can someone explain what's going on here and suggest how I might get around having to turn File and Printer Sharing on?

Thanks!

Keith

P.S. Everything works fine if the firewall is turned off.


.



Relevant Pages

  • RE: SQL Server Communication method
    ... Named Pipes is one, but the default with SQL 2000 is TCP. ... if you always want the clients to communicate over tcp to the SQL ... Create a TCP alias using the SQL Client Network Utility ...
    (microsoft.public.sqlserver.connect)
  • Why do I have to enable File and Printer sharing to connect through the XP firewall?
    ... The client uses the SQL Browser to locate available SQL instances. ... I have no problems locating the SQL instance using Management Studio or with ...
    (microsoft.public.sqlserver.clients)
  • Re: Cant connect to SQL
    ... You're still trying to use Named Pipes. ... Use both Client and Server Network ... Hello, the SQL Server 2000 installation uses Mixed authentication, SQL and ... "Client unable to establish connection. ...
    (microsoft.public.sqlserver.server)
  • Re: TCP and Named Pipe
    ... Most of our client pc's connect via TCP but ocasionally some connect via ... We have noticed a performance issue when named pipes are ... The client PC's don't use sql clients or sql software? ...
    (microsoft.public.sqlserver.clients)
  • Re: How choose net lib on client side?
    ... Interesting, so if I don't have the sql client loaded on a machine, what net ... an app that connects to SQL Server, I haven't loaded a client on it but the ... all of them appear to be using named pipes. ...
    (microsoft.public.sqlserver.server)