October 28, 2008 at 9:54 am
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)
I know this problem has been posted about before, I've seen and handled it and I've read every post out there about it, but this time I'm stumped and nothing is working.
My IIS site running ASP.NET 2.0, has multiple connections defined in the web config. They're identical except for the Database they each point to and the ID/PASS. One works, one doesn't. The server is setup to handle named pipes from remote connections. The databases have the correct users permissioned which I've tested. There's no firewall in the way. I get this message when using a valid user/login. They both used to work, then all of a sudden w/o warning one stopped.
To make things weirder, when I connect from my test server all the connections succeed.
<add name="CS1" connectionString="Data Source=ServerName;Database=DatabaseA; User ID=xxxxx;Password=xxxxx" providerName="System.Data.SqlClient"/>
<add name="CS2" connectionString="Data Source=ServerName;Database=DatabaseB; User ID=xxxx;Password=xxxx" providerName="System.Data.SqlClient"/>
One works, one doesn't. The only difference is the DB's and logins, which work from a diff server and verified by connecting through SQL Management Studio.
Banging my head against the wall,
-JZ
October 28, 2008 at 10:10 am
the portion you pasted has a trailing slash and closing bracket for your CS2 connection...was that just a copy/paste error, or could it be the issue??
Password=xxxx"/>
Lowell
October 28, 2008 at 10:15 am
yeah that was just from copying and pasting.
January 12, 2009 at 1:00 pm
hey hi joshz
even i had a same prob,,
solution:
1)go to sql server configuration manager
2)select network configurations.
3)select the instance which u had a prob with.
4)you can see the options on the right pane like shared memory,named pipes,tcp/ip,via
5)just disable the icon via,,
it should work bcos i tried in all ways,
as ur using named pipes,,it doest effects ur connection,,
thanq u..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply