Forum Moderators: open
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) at System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) at System.Web.UI.WebControls.SqlDataSource.Insert() at devOrthman.Product.SubmitDrawingButton_Click(Object sender, EventArgs e)
I have added a command timeout to my connection string and changed it in IIS and I still get this error. Does anyone have any idea how I can make this wait longer? I can post the code of my page if need be. Thanks,
<asp:SqlDataSource ID="drawingsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:orthmanConnectionString %>"
SelectCommand="getDrawings" SelectCommandType="StoredProcedure" InsertCommand="addDrawing"
InsertCommandType="StoredProcedure" DeleteCommandType="StoredProcedure" DeleteCommand="deleteDrawing"
OnDeleted="On_Record_Deleted" >
<SelectParameters>
<asp:Parameter Name="ProductId" Type="Int32" DefaultValue="0" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="DrawingTextBox" Name="Name" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="DrawingOverviewTextBox" Name="OverviewText" PropertyName="Text"
Type="String" />
<asp:Parameter DefaultValue="0" Name="productID" Type="Int16" />
<asp:Parameter Name="PathToPDF" Type="String" />
<asp:Parameter Name="sourceFile" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
Do I need to set it in the asp side?
[edited by: marcel at 7:23 pm (utc) on Sep. 9, 2009]
[edit reason] fixed accidental smiley [/edit]
Protected Sub drawingsSqlDataSource_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles drawingsSqlDataSource.Selecting
e.Command.CommandTimeout = 0
End Sub