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 TrivediPosted Jul 3, 2013, 4:51 AM
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.
Kunal VaishyaPosted Jul 3, 2013, 4:36 AM
Amit ChoudharyPosted Jul 1, 2013, 4:10 AM
Iftikar HussainPosted Jul 1, 2013, 4:07 AM
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