Re: provider: Named Pipes Provider, error: 40 - Could not open a c
- From: brightSasi <brightSasi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Jul 2007 10:56:02 -0700
Hi Sue,
I have tried connecting to Sql Management Studio and it worked pretty much
fine. But suddenly, since yesterday, when i was trying to connect i get the
following error.
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server) (.Net SqlClient Data Provider)
when is use object explorer to connect to other server, it works pretty much
fine, if i am trying to connect to the actual server i have this issue.
Sasi
"Sue Hoegemeier" wrote:
Try including the network protocol in the connection string.
so that you connect with TCP/IP instead of named pipes -
add: Network Library=DBMSSOCN;
-Sue
On Sat, 14 Jul 2007 13:11:46 -0700, jobs <jobs@xxxxxxxxxx>
wrote:
Hello.
I have a sql server install / database on the web server. Work great,
all my asp.net 2.0 code on that server can access the database with no
problem.
I can access the database on the web server from my development
machine through sql authentication from the sql server client with no
problem.
However, if I attempt to access the database over the network from my
dev box through ado.net (asp.net/vb.net) using that same user I get
the following errror.
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
The wierd thing is from Visual Studio. net 2005 on my dev box, i am
able to create a connection to that web servers database and query the
data using the same user.
Here's my connection string in the web.config:
web.config:
<add name="PKBConnectionString" connectionString=
"Data Source=192.168.xx.xx Catalog=xxx;Persist Security Info=True;
User ID=xxx;Password=xxxx" providerName="System.Data.SqlClient"/>
class:
Sub New()
p_cnn = New
SqlConnection(ConfigurationManager.ConnectionStrings("xxxConnectionString").ConnectionString)
p_cnn.Open() ' where the code is failing.
End Sub
Thanks for any help or information.
- Follow-Ups:
- Re: provider: Named Pipes Provider, error: 40 - Could not open a c
- From: Rick Byham, \(MSFT\)
- Re: provider: Named Pipes Provider, error: 40 - Could not open a c
- References:
- Prev by Date: Default protocols ..
- Next by Date: Cannot connect to SQL 2000 remotely
- Previous by thread: Re: provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
- Next by thread: Re: provider: Named Pipes Provider, error: 40 - Could not open a c
- Index(es):
Relevant Pages
|