please dont rip this site

Debugging a Global.asa File

Debugging a Global.asa differs from debugging .asp files.

If there is an error in a Global.asa file (either a syntax error or runtime error), the server stops the procedure containing the error. If the Script Debugger is enabled for that ASP application, the server starts the debugger and displays an error message. If the Script Debugger is not enabled for the ASP application, an error message is sent to the client browser. In either case, the procedure containing the error stops. When you fix the error in a Global.asa file and request a page from the application again, the procedures in a Global.asa are executed again when the ASP application is restarted — a Global.asa file is executed again whenever you make a change in it and save it.

To control when the Script Debugger is called from a Global.asa file, include a statement that starts the debugger explicitly, such as Stop in VBScript or debugger in JScript. Place the statement at the beginning of the procedure, before any statements that you will want to step through.

When the application starts or when a user starts a new session, the corresponding procedure in a Global.asa file will run. The Script Debugger will start when the Stop or debugger statement is executed. You can then step through the procedure normally, use the Command window to evaluate expressions and set values, and so on.

However, you cannot stop and restart the script by refreshing a Global.asa file. If you want to rerun the Application_OnStart event procedure, you must stop the application and then restart it. If you want to rerun the Session_OnStart event procedure, you can restart your browser, which starts a new session and reruns the Session_OnStart event procedure. Alternatively, you can request a page that includes a script to call the Session object’s Abandon method, and then start a new session.


© 1997 by Microsoft Corporation. All rights reserved.


file: /Techref/inet/iis/debug/sdbug_28.htm, 4KB, , updated: 2002/5/22 16:35, local time: 2025/5/21 20:30,
TOP NEW HELP FIND: 
216.73.216.114,10-2-108-60:LOG IN

 ©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/techref/inet/iis/debug/sdbug_28.htm"> Debugging the GLOBAL.ASA File</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .