Reputation: 81
I have installed SQL Server 2008 R2 on my server and a C# application on Network Drive.
When I am running this application on server, it is working fine. But the problem occurs when I am running the application from client machines.
It does not connect to the server. I get the following error
Network related specific error..
Can anyone give me any solution ?
Connection string used:
<connectionStrings>
<add name="Truly_Paste_Solution.Win.Properties.Settings.TrulyDBAConnectionString"
connectionString="Data Source=.\sqlexpress;Initial Catalog=TrulyDB;Integrated Security=True;Pooling=False"
providerName="System.Data.SqlClient"/>
</connectionStrings>
Upvotes: 0
Views: 1124
Reputation: 1435
What's your connection string ? Did you connect the SQL Server by IP ? Is there any firewall or Rules on your Server ?
Assuming your Server Lan IP address is 192.169.1.199 and your are running on MSSQL Server, so your connection string should be like :
Data Source=192.168.1.199;Initial Catalog=somedatabase;uid=yourid;pwd=yourpassword
Read about how to enable TCP/IP protocol connection here
Upvotes: 1
Reputation: 1474
There are different possible causes to get that kind of error -
Upvotes: 0