Results 1 to 4 of 4

Thread: Timeout error

  1. #1
    Join Date
    Feb 2003
    Posts
    62

    Timeout error

    If I leave a Tornado page open for a period of time (30 minutes, say), I get the

    `Object reference not set to an instance of an object.' error. I presume this is because it has timed out. I can't find any way of trapping this error so that I can either display a friendly message or take the user to another page.

    Any suggestions?

    Thanks

    Bob

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    This not seems like the right message for timeout. You can trap this message in the config file. I have seen some articles before in this aspect.

    Frank

  3. #3
    Join Date
    Feb 2003
    Posts
    62

    Application error code

    I think this is the code you were talking about. It adds an entry in the Application Event log - courtesy of Microsoft:

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    rem ************* 18th March 2005 - Application Error trap ***********
    rem ** Creates Event in Application Event log - can use to redirect ****
    rem ** to Error page ************************************************** *
    rem ************************************************** ******************

    Dim objErr As Exception = Server.GetLastError().GetBaseException()
    Dim err As String = "Error Caught in Application_Error event" & _
    System.Environment.NewLine & _
    "User: " & session("g_Fullname") & _
    System.Environment.NewLine & _
    "Error in: " & Request.Url.ToString() & _
    System.Environment.NewLine & _
    "Error Message: " & objErr.Message.ToString() & _
    System.Environment.NewLine & _
    "Stack Trace:" & objErr.StackTrace.ToString()
    EventLog.WriteEntry("EasyOcis: ", err, EventLogEntryType.Error)
    Server.ClearError()
    'additional actions...
    End Sub

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    The one I've seen is in the Config file and redirect the error to an URL. I'll look up the article.

    It is the custom error element in the config file.

    http://msdn.microsoft.com/library/de...orsSection.asp


    Frank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •