SQLExpress 2008 R2 + Winforms Application + Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ;
Sunday, January 13, 2013 3:44 PM
User is using winform application with SQL express. Application is working fine and suddenly he was seeing exception window with data extraction error.
Exception details are :Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ; SQL exception number is -2.
Within fraction of seconds if user hits F5 application is working without any issues. I don't see any help online except that exception number -2 means firewall is blocking the connection.
I wanted to either reproduce the issue on my end or wanted to know exact reason for the error. Appreciate your response.
Sunday, January 13, 2013 9:02 PMModerator
Try to set the CommandTimeout property on the SQLCommand object to a greater value.
Make sure your application is not leaving connections open.
Hope this helps.
Tuesday, January 15, 2013 12:10 AMModerator
Would you please check-out
SQL Server Setup Team
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
This can be beneficial to other community members reading the thread.