4
Answers

A network-related or instance-specific error occurred while establishing a connection to SQL Server

Photo of Pravin Ghadge

Pravin Ghadge

13y
2.6k
1
Hi friends.

I am developing asp.net application where i have used foll. connection string:

<connectionStrings>
<add name="ConnectionString"  connectionString="Data Source=67.15.149.222;Initial Catalog=dbDemo;User ID=xxxx;Password=xxxxx;"  providerName="System.Data.SqlClient"/>
</connectionStrings>
  

This connection string runnig properly on localhost PC.
But when iam uploading website on server. it showing foll error:


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) 



Plz help me out... it's urgent

Answers (4)

0
Photo of Pravin Ghadge
NA 2.5k 358.5k 13y
hi kaushal,

It is properly runnning on local PC but when iam uploading that website on server it is giving me error.

0
Photo of kaushal raval
NA 3 0 13y
See "Sql Server Browser" Service is Started or not in "Service.msc" Of Db Server
0
Photo of Pravin Ghadge
NA 2.5k 358.5k 13y
Yes iam able to connect database from my SQl server by entering its ip, username & password.
how to ping the server db...
(eg. ping 67.15.149.222 -t )
0
Photo of Muralidharan Deenathayalan
NA 11.9k 1.5m 13y

The error message says, the web server is unable to connect the web server.

Are you able to connect the database server by using "67.15.149.222" IP ? 
Does the sql server is running in default instance or are you using any user instance?

From the web server, try to ping the db server.
Next Recommended Forum