Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

All of a sudden I started getting this error in my application. Can someone help me out?

Thank you
JessyRobinson1234Asked:
Who is Participating?
 
iopenCommented:
The CommandTimeout property of the SqlCommand object. Set at 0 for infinite timeout.

Here is a msdn link:

http://msdn.microsoft.com/en-us/library/ms136347(vs.71).aspx
0
 
iopenCommented:
Increase your request timeout in the web config.

<configuration>  
  <system.web>
   <httpRuntime executionTimeout="120" maxRequestLength="4200"  />
 </system.web>
</configuration>
0
 
JessyRobinson1234Author Commented:
It's set at:

<httpRuntime maxRequestLength="102400" executionTimeout="3600"/>
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
iopenCommented:
Have you tried changing the CommandTimeout property of your SqlCommand object?
0
 
JessyRobinson1234Author Commented:
It looks like there might be a problem with the if elseif statement:

  Try
            If bLink.Visible And FileUpload1.HasFile Then
                CTAdapter.Update_CT(parameters)
            ElseIf bLink.Visible = False And FileUpload1.HasFile Then
                CTAdapter.Update_CT(parameters)
            Else
                CTAdapter.Update_CT_NoFile()
            End If

        Catch ex As SqlClient.SqlException
            Me.lblError.Text = ex.Errors.Item(0).Message.ToString
            Me.lblError.Visible = True
            Exit Sub


        End Try
0
 
JessyRobinson1234Author Commented:
iopen,

No I haven't tried that. How and where would I do that in the code?

jessy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.