Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP Script Timeout error

Posted on 2004-04-14
14
Medium Priority
?
697 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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