Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i am getting following Error message :
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

when i am fetching data from sql server.

Please suggest me if you have any suggestion.
Posted

To solve this problem you can increase the PostBack timeout of ScriptManager.
ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeOut="600" >
</asp:ScriptManager>



--Amit
 
Share this answer
 
Comments
prash.g 29-Sep-14 4:21am    
Thanks for the solution Amit.
You might be searching for this.[^]
 
Share this answer
 
The problem you are facing because of When your application runs into a timeout on a sql database query's. It taking more than default time to return out put. So you need to increase ConnectionTimeout property.

You can do it in several ways

1. A ConnectionString has a ConnectionTimeout property. It is a property which determines the maximum number of seconds your code will wait for a connection of the database to be open. You can set connection timeout in connection string section in web.config.

ASP.NET
<connectionstrings>
      
<add name="ConnectionString" connectionstring="Database=UKTST1;Server=BRESAWN;uid=" system.data.sqlclient="/><br mode=" hold=" /><br mode=" html="> <asp:ToolkitScriptManager runat=" server=" AsyncPostBackTimeOut=" 6000="><br mode="></add></connectionstrings>


2. You can put AsyncPostBackTimeout="6000" in .aspx page

ASP.NET
<asp:ToolkitScriptManager runat="server"; AsyncPostBackTimeOut="6000";
   </asp:ToolkitScriptManager>


3. You can set timeout in sqlcommand where you are calling storeprocedure in .cs file.

C#
command.CommandTimeout = 30*1000;


hope you have got solution.
 
Share this answer
 
v2

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