JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
Building WebApps
«Prev
Intro ASP
Active Server Pages
Server Side Scripting
Script Syntax
Constants Variables
Arithmetic Operators
Decision Statement
Builtin Functions
Response Write
Three Parts
ASP Object Model
Methods Write Scripts
Project Interactive Message
Server Side Conclusion
Browser Server Dialog
Browser Server Communication
Request Query String
ASP Request Cookies
ASP Response Object
Customizing User Experience
Advertisement Rotation
Building Webapps
Running ASP Web Application
Running Managing ASP App
Using Global Asa File
App Level Variables
Variables Race Condition
File System Object
Writing Text File
Reading Outputting Files
Write Session Variables
ASP Web App Structure
Running and managing ASP Application
1) Web Server is turned on, ASP is running, and the Global.asa file is in the root directory. There are currently no users connected to the website.
2) A user directs her browser to the home or default page of our web site. ASP automatically runs the Global.asa file. If there is a procedure in Global.asa to run prior to starting the web application (called Application_OnStart), any code in that procedure will be executed.
3) The first user starts the application and begins her own session. ASP again goes to Global.asa and looks for, and runs, any Session_onStart procedure.
4) If another user connects to the website while the first user is still on the website, a session is started for this user. Since the application has been started, ASP does not rerun the Application_OnStart procedure. As users connect to and disconnect from the website, additional sessions are created. However, all users share the same application object and application variables.
5) As user sessions expire, ASP runs the Session_OnEnd procedure, if there is one, in the Global.asa file and shuts down the sessions. The application continues to run as long as at least one user is connected to the website.
6) When the last user's session expires and ASP has run the Sesion_OnEnd procedure for it, any Application_OnEnd procedure stored in Global.asa is run. The application is terminated and all application variables are erased, although the Web server continues to run.
7) The website is again ready for the next user(s) to connect to it.