troubleshooting Question

Why am I getting a named pipes error to local sql server 2008 from asp.net app?

Avatar of bolenka
bolenka asked on
Microsoft SQL ServerASP.NETMicrosoft SQL Server 2008
25 Comments1 Solution891 ViewsLast Modified:
I am getting the following error when I try to connect to a local SQL Server 2008 Database:
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)

I understand that it may be a problem with my connection strings:
<add name="sports2connstr" connectionString="Data Source=localhost;Initial Catalog=sports;User Id=Owner;Password=Owner" providerName="System.Data.SqlClient"/>  

    <add name="sportsconnstring" connectionString="Data Source=localhost;Initial Catalog=sports;User Id=Owner;Password=Owner" providerName="System.Data.SqlClient"/>

I have read different things like:
make sure you give the db rights, and make sure it uses Windows Authentication in connection string...But I don't know how.

I just want to connect to a local version of my db in Sql Server Management Studio 2008 from asp.net on the same box.
Microsoft SQL Server Management Studio                                    10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft Data Access Components (MDAC)                                    6.0.6001.18000 (longhorn_rtm.080118-1840)
Microsoft MSXML                                    3.0 4.0 5.0 6.0
Microsoft Internet Explorer                                    7.0.6001.18000
Microsoft .NET Framework                                    2.0.50727.3053
Operating System                                    6.0.6001

Please help.

   
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 25 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 25 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros