Having a timeout problem

Discussion in 'ASP .Net' started by tfs, Jul 13, 2004.

  1. tfs

    tfs Guest

    I have a page that is running a DTS package and takes anywhere from 1
    minute to 20 minutes. When it comes back it displays in my textbox
    the results.

    The problem is that on the long packages, the page times out after
    about 30 seconds.

    What is the best way to display a now processing ticker and prevent
    the page from timing out?

    Here is a snippet of the code I am running:

    Dim objConnect as SqlConnection = new
    SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Contour_Server"))

    objConnect.Open()

    sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
    chr(34) & "OPENWORX" & chr(34)
    & " /N " & chr(34) &
    request.QueryString("name") & chr(34)
    & " /E '"

    Dim objCommand as SqlCommand = new SqlCommand(sqlString,
    objConnect)
    Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
    CommandBehavior.CloseConnection)

    dim ktr as integer
    ktr = 0
    while (objDataReader.Read() = true)
    if(objDataReader(0) is System.DBNull.value) then
    sResults = ""
    else
    sResults = objDataReader(0)
    end if

    results.text = results.text & sResults & vbCrLf
    ktr = ktr + 1
    end while

    results.text = results.text & "at end of loop ktr = "
    & ktr & vbCrLf
    objDataReader.Close()
    objCommand.Dispose()
    objConnect.Close()


    The code sits at the ExecuteReader until the DTS Package is done.

    Thanks,

    Tom.
    tfs, Jul 13, 2004
    #1
    1. Advertising

  2. tfs

    Bobby Ryzhy Guest

    The DTS package needs to be started from an assyncronous process. One that starts it and returns to the page an immediate result. The page
    then need to poll the process for progress (basically refreshing itself every 5 seconds or so).

    Bobby Ryzhy
    bobby@ domain below
    http://weekendtech.net


    On 12 Jul 2004 18:03:29 -0500, -spam.invalid (tfs) wrote:

    >I have a page that is running a DTS package and takes anywhere from 1
    >minute to 20 minutes. When it comes back it displays in my textbox
    >the results.
    >
    >The problem is that on the long packages, the page times out after
    >about 30 seconds.
    >
    >What is the best way to display a now processing ticker and prevent
    >the page from timing out?
    >
    >Here is a snippet of the code I am running:
    >
    >Dim objConnect as SqlConnection = new
    >SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_Contour_Server"))
    >
    >objConnect.Open()
    >
    >sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
    >chr(34) & "OPENWORX" & chr(34)
    >& " /N " & chr(34) &
    >request.QueryString("name") & chr(34)
    >& " /E '"
    >
    >Dim objCommand as SqlCommand = new SqlCommand(sqlString,
    >objConnect)
    >Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
    > CommandBehavior.CloseConnection)
    >
    >dim ktr as integer
    >ktr = 0
    >while (objDataReader.Read() = true)
    > if(objDataReader(0) is System.DBNull.value) then
    > sResults = ""
    > else
    > sResults = objDataReader(0)
    > end if
    >
    > results.text = results.text & sResults & vbCrLf
    > ktr = ktr + 1
    >end while
    >
    >results.text = results.text & "at end of loop ktr = "
    >& ktr & vbCrLf
    >objDataReader.Close()
    >objCommand.Dispose()
    >objConnect.Close()
    >
    >
    >The code sits at the ExecuteReader until the DTS Package is done.
    >
    >Thanks,
    >
    >Tom.


    Bobby Ryzhy
    bobby @ domain below
    http://weekendtech.net
    Bobby Ryzhy, Jul 13, 2004
    #2
    1. Advertising

  3. "Bobby Ryzhy" <> wrote in message
    news:...
    > The DTS package needs to be started from an assyncronous process. One

    that starts it and returns to the page an immediate result. The page
    > then need to poll the process for progress (basically refreshing itself

    every 5 seconds or so).

    How would I do that? I assume that is not what I am doing now?

    Tom.


    >
    > Bobby Ryzhy
    > bobby@ domain below
    > http://weekendtech.net
    >
    >
    > On 12 Jul 2004 18:03:29 -0500, -spam.invalid

    (tfs) wrote:
    >
    > >I have a page that is running a DTS package and takes anywhere from 1
    > >minute to 20 minutes. When it comes back it displays in my textbox
    > >the results.
    > >
    > >The problem is that on the long packages, the page times out after
    > >about 30 seconds.
    > >
    > >What is the best way to display a now processing ticker and prevent
    > >the page from timing out?
    > >
    > >Here is a snippet of the code I am running:
    > >
    > >Dim objConnect as SqlConnection = new

    >
    >SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("MM_CO

    NNECTION_STRING_Contour_Server"))
    > >
    > >objConnect.Open()
    > >
    > >sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
    > >chr(34) & "OPENWORX" & chr(34)
    > >& " /N " & chr(34) &
    > >request.QueryString("name") & chr(34)
    > >& " /E '"
    > >
    > >Dim objCommand as SqlCommand = new SqlCommand(sqlString,
    > >objConnect)
    > >Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
    > > CommandBehavior.CloseConnection)
    > >
    > >dim ktr as integer
    > >ktr = 0
    > >while (objDataReader.Read() = true)
    > > if(objDataReader(0) is System.DBNull.value) then
    > > sResults = ""
    > > else
    > > sResults = objDataReader(0)
    > > end if
    > >
    > > results.text = results.text & sResults & vbCrLf
    > > ktr = ktr + 1
    > >end while
    > >
    > >results.text = results.text & "at end of loop ktr = "
    > >& ktr & vbCrLf
    > >objDataReader.Close()
    > >objCommand.Dispose()
    > >objConnect.Close()
    > >
    > >
    > >The code sits at the ExecuteReader until the DTS Package is done.
    > >
    > >Thanks,
    > >
    > >Tom.

    >
    > Bobby Ryzhy
    > bobby @ domain below
    > http://weekendtech.net
    Thomas Scheiderich, Jul 14, 2004
    #3
  4. tfs

    Bobby Ryzhy Guest

    go to groups.google.com and type in asyncronous webservice.

    Bobby Ryzhy
    bobby@ domain below
    http://weekendtech.net

    On Tue, 13 Jul 2004 16:36:07 -0700, "Thomas Scheiderich" <> wrote:

    >"Bobby Ryzhy" <> wrote in message
    >news:...
    >> The DTS package needs to be started from an assyncronous process. One

    >that starts it and returns to the page an immediate result. The page
    >> then need to poll the process for progress (basically refreshing itself

    >every 5 seconds or so).
    >
    >How would I do that? I assume that is not what I am doing now?
    >
    >Tom.
    >
    >
    >>
    >> Bobby Ryzhy
    >> bobby@ domain below
    >> http://weekendtech.net
    >>
    >>
    >> On 12 Jul 2004 18:03:29 -0500, -spam.invalid

    >(tfs) wrote:
    >>
    >> >I have a page that is running a DTS package and takes anywhere from 1
    >> >minute to 20 minutes. When it comes back it displays in my textbox
    >> >the results.
    >> >
    >> >The problem is that on the long packages, the page times out after
    >> >about 30 seconds.
    >> >
    >> >What is the best way to display a now processing ticker and prevent
    >> >the page from timing out?
    >> >
    >> >Here is a snippet of the code I am running:
    >> >
    >> >Dim objConnect as SqlConnection = new

    >>
    >>SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("MM_CO

    >NNECTION_STRING_Contour_Server"))
    >> >
    >> >objConnect.Open()
    >> >
    >> >sqlString = "exec master.dbo.xp_cmdshell 'dtsrun /S " &
    >> >chr(34) & "OPENWORX" & chr(34)
    >> >& " /N " & chr(34) &
    >> >request.QueryString("name") & chr(34)
    >> >& " /E '"
    >> >
    >> >Dim objCommand as SqlCommand = new SqlCommand(sqlString,
    >> >objConnect)
    >> >Dim objDataReader as SqlDataReader = objCommand.ExecuteReader( _
    >> > CommandBehavior.CloseConnection)
    >> >
    >> >dim ktr as integer
    >> >ktr = 0
    >> >while (objDataReader.Read() = true)
    >> > if(objDataReader(0) is System.DBNull.value) then
    >> > sResults = ""
    >> > else
    >> > sResults = objDataReader(0)
    >> > end if
    >> >
    >> > results.text = results.text & sResults & vbCrLf
    >> > ktr = ktr + 1
    >> >end while
    >> >
    >> >results.text = results.text & "at end of loop ktr = "
    >> >& ktr & vbCrLf
    >> >objDataReader.Close()
    >> >objCommand.Dispose()
    >> >objConnect.Close()
    >> >
    >> >
    >> >The code sits at the ExecuteReader until the DTS Package is done.
    >> >
    >> >Thanks,
    >> >
    >> >Tom.

    >>
    >> Bobby Ryzhy
    >> bobby @ domain below
    >> http://weekendtech.net

    >


    Bobby Ryzhy
    bobby @ domain below
    http://weekendtech.net
    Bobby Ryzhy, Jul 14, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Johnson
    Replies:
    0
    Views:
    3,757
    Bob Johnson
    Aug 7, 2003
  2. Do
    Replies:
    2
    Views:
    6,364
  3. Jozef
    Replies:
    0
    Views:
    715
    Jozef
    Nov 15, 2005
  4. Jozef
    Replies:
    0
    Views:
    162
    Jozef
    Nov 15, 2005
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,280
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page