Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Posted
Comments
Thanks7872 8-Jul-15 9:11am    
Do you have any questions?

1 solution

Try increasing
SqlCommand.CommandTimeout
- a value of 0 indicates no limit
- default is 30 seconds
SqlConnection.ConnectionTimeout
- a value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect will wait indefinitely
- default value is 15 seconds

Hope, it helps :)

Reference:
SqlCommand.CommandTimeout Property [^]
SqlConnection.ConnectionTimeout Property[^]
 
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