Click here to Skip to main content
15,909,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Sir,

i am working in windows C# application with visual studio2010.

When connect with my main server,getting exception as Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

this happening while fill with dataset with dataadaptor.

connection string as in app.config
add name="constring" connectionString="server=XXX.XXX.XX.XX;uid=XXXXXX;pwd=XXXXXXX ;initial catalog=XXXXXXX;Connect Timeout=0;" providerName="System.Data.SqlClient"


please give the solution

Nandakumar S.
Posted

CSS
Please also set Command object timeout to Zero and try
i.e
cmd.CommandTimeout = 0;
 
Share this answer
 
Your question not clear.
But have you test that you server is not down?
Have you test you connection string?
Have you ping to you server?
Go to command prompt and type.
ping servername
If you get reply.
Then test you connection string.
If you can elaborate on above mention point.
I can have more understanding about you question.
 
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