Last post Dec 15, 2010 12:28 PM by gchhatwal
Nov 29, 2009 01:05 AM|Ricardojb|LINK
I am puzzled.
I am running SQL 2005 Developers edition (64 bits) on Windows 7 (also 64 bits) and Visual Studio 2008.
I have a web application that cannot connect to SQL Server, the error is: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name
is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The only possibility that I still have to research is that maybe named pipes are disabled in windows 7 and a web app. running locally and connecting to a local sql server will use named pipes.
I know this is possibly more a windows problem, I did get a message when I installed sql 2005 that there were compatibility issues but the solution was to install SP1 which I did.
I probably will post the same question in the msdn forums and if not solved I will use one of my incidents since I am an MSDN suscriber, but since this is happening with a web app. I thought maybe someone knows something.
Thanks in advance.
Nov 29, 2009 05:23 AM|ali62b|LINK
some of these kinds of problem related to uncompatibility of SQL Server 2005 with win 7's core.
try to upgrade to
SP3 which has fixed these kinds of issues .
sql 2005 developer
Nov 29, 2009 09:00 PM|Ricardojb|LINK
thanks, I didn't even know there was an SP3
Nov 29, 2009 09:41 PM|Ricardojb|LINK
I turned out that I already had most of the updates (throough Windows update), I am still having the problem.
Nov 29, 2009 10:26 PM|Ricardojb|LINK
well, well, I am embarassed.
What needed update is my brain.
I was updating the connection string on the web.config but, it's a multitier application, the data access component is in a separate .dll and has its own connection string.
both connections had the server name of my old machine, but I wasn't updating the DAL.
I hope there is a Service Pack for my brain, I designed and wrote this application, I should have known!
Also, a little bit of debugging would have shown me that the connection string was wrong!
shame on me!
Dec 15, 2010 12:28 PM|gchhatwal|LINK
Don't be too hard on yourself. This thread actually helped me. For all the people having trouble, remember, once you have installed SP4 for SQL 2005, pay attention to the last screen. Leave the checkbox checked. When you click next, a list of current sql
instances will be shown. You must give them access ( move them to the right window) in order to connect to the local instance of SQL. Hope this helps someone.