I GOT ERROR LIKE THIS ...PLZ RESOLVE MY ERROR
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source Error:
|

Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 3, 2013, 12:51 AM EDT
hi,
before you increce time out property of Sqlcommand, make sure your query is highly optimize, proper indexes create on tables.
and more important in any where of your project dead lock is not created!..
hope this will help you.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 1, 2013, 12:07 AM EDT
Increase the time out value in connection string as shown below
string connstring="Data Source=localhost;User ID=sa; pwd=password; Initial catalog=nothwind;connect timeout=900;
Then set command object timeout
com.CommandTimeout=0; // this will makes Command to execute unlimited seconds
and always dispose connection object
Regards,
Iftikar
Amit ChoudharyRank #145 · 15.8K reputationPosted Jul 1, 2013, 12:10 AM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Jul 3, 2013, 12:36 AM EDT