[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP Script Timeout error

Posted on 2004-04-14
14
Medium Priority
?
700 Views
Last Modified: 2008-02-01
I have put a central error handling mechanism for my website which reports all technical glitches and emails them to me. But I am also getting the script timeout error when the script timeout is done is some of the pages. I do not want to get an email when this occurs. Basically I changed the 500-100.asp file to my ErrorHandler.asp , it catches the error and emails me and shows the user some friendly message. Now with the timeout script it should do nothing, it should not display user anything. Basically I have to skip this error from my ErrorHandling.


0
Comment
Question by:tech_question
  • 9
  • 5
14 Comments
 
LVL 7

Expert Comment

by:brgivens
ID: 10829943
If Server.GetLastError <> adErrStillExecuting Then
  ' mail yourself the error details
End If

I'm taking a guess as to which error# is the timeout you want - it's probably one or the other of these two:

adErrStillExecuting (&He7f)
adErrStillConnecting (&He81)
0
 

Author Comment

by:tech_question
ID: 10830209
My problem is that a lot of  asp pages which have the script timeout method , have their own functionality. One asp  page shows a different message for a script timeout  , another page shows a different message. So basically I want to bypass the Scripttimeout error
from IIS rather   through my ErrorHandler.asp  page .
Thanks,

Tech.
0
 

Author Comment

by:tech_question
ID: 10838356
Any ideas?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Accepted Solution

by:
brgivens earned 1500 total points
ID: 10838475
How about this in the 500-100.asp file:

Dim err
err = Server.GetLastError
If err.ASPCode = adErrStillExecuting Then
  Response.Redirect err.File() & "?timeout"
Else
  ' other error handling routines
End If

In the individual asp files:

If Not IsEmpty(QueryString("timeout")) Then
  ' handle the timeout
Else
  ' normal execution
End If
0
 

Author Comment

by:tech_question
ID: 10849890
so I cannot do it at the IIS ?
0
 
LVL 7

Expert Comment

by:brgivens
ID: 10849986
No, AFAIK you can't
0
 

Author Comment

by:tech_question
ID: 10851492
brgivens -  The ErrorHandler.asp would is the umbrella for my entire website for handling technical errors and glitches, what will happen if I write my own individual error handling code in individual pages? Which one will execute?


0
 
LVL 7

Expert Comment

by:brgivens
ID: 10851505
take a look at my code again... err.File() returns the url of the file where the error occured... the cose I posted returns control back to whichever page the error originated from... I'm passing a QueryString to the page so you can distinguish between normal execution and an error.  Understand?
0
 

Author Comment

by:tech_question
ID: 10851839
I am sorry , I should have looked at the code in more detail. But my problem is I do not have access to the individual asp files, but I know that they do indeed handle the Script Time out error and customize the user. So will the user get the customized message whatever is given to the user in the inidividual pages if I write the below code in my Central Error Handler asp file.

//
If err.ASPCode = ScriptTimeOutError (I do not know the exact code for this error) Then

  Response.Redirect err.File()

end if

0
 
LVL 7

Expert Comment

by:brgivens
ID: 10853070
No, each individual page must be modified to handle the redirect.
0
 

Author Comment

by:tech_question
ID: 10859956
brgivens - Can I  get the exact URL from which the error has occured reported onto my ErrorHandler.asp. Because if they are include files, I am unable to get to know from which url the error is being thrown.

Eg: www.xxx.com/123.asp

if there is error in 123_include.inc which in included in 123.asp, I should get the URL as www.xxx.com/123.asp to be reported.


0
 

Author Comment

by:tech_question
ID: 10860306
I am using this ServerVariables("HTTP_REFERER")- I get null string.
0
 

Author Comment

by:tech_question
ID: 10860427
I understand why HTTP_REFERER does not work! but I need the requirement  as I stated!
0
 

Author Comment

by:tech_question
ID: 10862787
I answered this myself ServerVariables("http_url ") and ServerVariables("ServerName")
!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question