I'm trying to extend the timeout of an SqlDataSource beyond 30 second (Seems to be the default). I'm trying to run a stored procedure that has to run through 100,000s of records. During busy periods it times out. I'm using ASP.NET 4.0 and IIS 6.0 on 2003 server.
Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I've tried to no avail to extend the timeout:
< asp:SqlDataSource ID="dsTest" EnableCaching="true" CacheDuration="604800" runat="server" ConnectionString="<%$ ConnectionStrings:SuperNARIC %>" SelectCommand="selectStatus" SelectCommandType="StoredProcedure" onselecting="dsTest_Selecting" >
<SelectParameters>
< asp:ControlParameter ControlID="ddlCar" Name="CountryID" PropertyName="SelectedValue" Type="Int32" />
< /SelectParameters>
< /asp:SqlDataSource>
protected void dsTest_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
e.Command.CommandTimeout = 300;
}
Any help would be greatly appreciated.
Thanks