Reputation: 25223
when I am trying to run my project I am getting follwing error message
Message : Message : Message : Message : Message : 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 am trying both with my local Database and Server Database, getting same error. but when I am uploading it on my test site it works there. when I am running my another project they works fine. please told me what I need to do run this on my local machine.
Upvotes: 0
Views: 283
Reputation: 614
Ensure the following,
SQL Server should be up and running. Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Services, and check if SQL Server service status is “Running”
Enable TCP/IP in SQL Server Configuration Go to All Programs >> Microsoft SQL Server 2008 >> Configuration Tools >> SQL Server Configuration Manager >> Select TCP/IP. Right Click on TCP/IP >> Click on Enable
Enable Remote Connection In SqlServer, Right click on the server node and select Properties.In the Server properties dialogbox,Go to Connections in the left pane and check “Allow remote connections to this server”
Upvotes: 1