Click here to Skip to main content
15,749,288 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone
I developed a C # application and SqlServer database, the connection string is as follows:
C#
string chaine = "Data Source=192.168.0.20,1433;Initial Catalog=MaBase;Integrated Security=true;pooling=false"

when I executes the application in a client , it displays the following error message:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.

I want to know where is the problem.
thank you in advance
Posted
Updated 15-Jan-15 1:20am
v4
Comments
CHill60 15-Jan-15 7:21am    
Perhaps you have a long-running query

1 solution

Probably, it's the authorization - it's unusual to use Integrated Security outside of localhost, even if it's on the same LAN as yours is.

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900