Solved

How do I trap for a script timeout error ASP0113.

Posted on 2001-06-22
5
712 Views
Last Modified: 2012-06-21
Does anyone know how to trap for script timeout errors, so that if it happens I can present a user friendly message instead of the message

"The maximum amount of time for a script to execute was exceeded. You can change the limit by specifying a new value for the property Server.ScriptTimeOut or by changing the value in the IIS administration tools."

Please note that I have already increased the timeout value . I am looking for a generic way for testing for script timeout rather than a way to improve performance.
0
Comment
Question by:davejcole
[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
  • 3
5 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6217658
AFAIK there is no way...
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6217673
this error is thrown by the asp.dll i think..
0
 
LVL 10

Expert Comment

by:makerp
ID: 6217693
no way, the script will time out and end, there is no way to trap that, worse still no way to inform the browser as i assume the connection will go when the script ends.
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6217744
you can try to fetch the content of the page from another asp page .. this is a turn around to do it..

How do I read the contents of a remote web page?    
You can include static txt and HTML files from remote servers by using a component (such as AspHTTP (http://www.serverobjects.com/products.htm), ASPTear (http://www.alphasierrapapa.com/ComponentCenter/AspTear/), or VB's built in InetCtrls) to parse the remote URL's content.
 
You can also try this method out, it uses the MSXML objects which are installed with Windows 2000 (or you can download them here (http://download.microsoft.com/download/xml/Install/3.0/WIN98Me/EN-US/msxml3.exe) for other operating systems):
 
<%
    url = "http://www.espn.com/
    set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")
    xmlhttp.open "GET", url, false
    xmlhttp.send "" 
    Response.write xmlhttp.responseText
%>


the last method is recommended.. you simply check for the timeout error.. if it didn't timeout then display the content, otherwise redirect to your default error template

0
 
LVL 20

Accepted Solution

by:
Silvers5 earned 75 total points
ID: 6217754
<%
   url = "yourtarget.asp"
   set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")
   xmlhttp.open "GET", url, false
   xmlhttp.send "" 
   if instr(xmlhttp.responseText,"Timed out ..etc fetch an exact  sentence from the timout page") then
set xmlhttp = nothing
response.redirect "scripttimedout.asp"
else
Response.write xmlhttp.responseText
set xmlhttp = nothing
end if
%>


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…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

628 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