Error code:
Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Can someone provide me with code I can copy and paste so I can change the default timeout? I'm not sure where to put it into this code:
<head runat="server">
<title>Proxy Report</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Proxy Report"></asp:Label>
</div>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ISALog1ConnectionString %>"
SelectCommand="ProxyReport" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</form>
</body>
</html>
The time (in seconds) to wait for a connection to open. The default value is 15 seconds.
SQL Server will typically show you connection timeouts or operation (query) timeouts. These values are set by the client connecting to the SQL Server. An operation timeout occurs when a command takes too long to complete, and the client raises an error.
Changing Command Timeout in Server: In the object browser tree right click on the server which give you timeout and select "Properties" from context menu. you can set the value in up/down control. Save this answer.
You can increase the Timeout property like this
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
e.Command.CommandTimeout = 0;
}
Setting timeout to 0 means no timeout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With