Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timeout period elapsed
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01263797
Message ID:
01263827
Vues:
9
>I have a stored procedure that returns the data which I show on the grid. It generally takes less then 30 seconds. Now it will take 2 minutes or 3 minutes due to recent changes. The exception is thrown when it takes longer then 30 seconds. This is the message I get
>
>System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
>

Is this being run in an ASP.NET page? If so, the page itself is probably timing out. You can edit the web.config file and modify the executionTimeout and increase it (it's in seconds). It's in the , section.

Or, you can set it on the page level by adding code to the Page_Init() and Page_Unload() to set/reset the timeout values:
private int m_timeOut;

private void Page_Init(object sender, System.EventArgs e)
{
   this.m_timeOut = Server.ScriptTimeout;
   Server.ScriptTimeout = 60 * 3; // 3 minutes
}

private voide Page_Unload(object sender, System.EventArgs e)
{
   Server.ScriptTimeout = this.m_timeOut;
}
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform