provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server



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.

.



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)
  • Re: Help! Set up Windows Group to access application
    ... The connection string for a trusted connection is: ... --add login as database user ... SQL Server MVP ... If you have troubles with finding your ways in Crystal Reports, ...
    (microsoft.public.sqlserver.security)
  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Visual Studio but not to VS 2003. ... Create a Connection object and pass in a ConnectionString to address ... manage the database table you reference. ... Yep, my latest book can help too, but mostly if you're targeting SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)

Loading