Results 1 to 6 of 6

Thread: Explain the Global.asa file and ASPError Object in ASP

  1. #1
    Join Date
    Nov 2009
    Posts
    75

    Explain the Global.asa file and ASPError Object in ASP

    Can any one explain to me the Global.asa file and ASPError Object in ASP (Active Server Pages). This is my assignment topic for this week. I have very recently started learning ASP language and this is not at all easy for me. I am not good at programming languages. I have earlier studied C++, but that does not seems to be of much help in ASP. So please help me.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    ASP: ASPError Object

    In case there is any error in the script then we can us e the ASPError object that displays the error information in the script. The ASPError object's information can only be accessed with the help of Server.GetLastError method. The ASPError object was introduced in ASP 3.0. Thus it displays information about the last error in the script.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    ASPError Object Properties

    Following are a few ASP ASPError Objects:

    • Description: ASPError.Description()
      To get a precise description of the error the description property is used.
    • Source: ASPError.Source()
      To view the actual source code of the line where the error has happened you may use the Source property.
    • ASPCode: ASPError.ASPCode()
      To get the IIS generated error code you may use the ASPCode property.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Global.asa file

    The ASP supports an optional file which holds the declarations for methods, objects and variables. These can be accessed by all ASP pages in an application using the Global.asa file. An important thing to remember with the Global.asa file is that every application has a single Global.asa file. Root directory contains this Global.asa file of the application.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Global.asa for session and application events

    The initialization code of the session and application is stored in the global.asa file of ASP. The global.asa file is not a required file but an optional file. It should always be present in the root directory of the ASP application. Thus it is considered as a special file which handles the application and session events of ASP. Even I had hard times to learn ASP because I was also not from a programming background.

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Events in global.asa

    There are four events in the ASP global.asa file:
    • Application_OnStart : The Application_OnStart event is called before any .asp files are processed. In an ASP application when the very first user calls the initial page the Application_OnStart event occurs.
    • Application_OnEnd: Just about opposite to Application_OnStart, occurs as soon as the last user ends the ongoing session.
    • Session_OnStart: When a new user of the ASP application asks for their first web page the Session_OnStart event occurs.
    • Session_OnEnd: As soon the user ends the session the Session_OnEnd event is said to occur. It has a 20 minutes default time out.

Similar Threads

  1. Replies: 5
    Last Post: 05-01-2010, 05:42 PM
  2. Explain XML Document Object Model and XML Related Technologies?
    By Javiier in forum Software Development
    Replies: 5
    Last Post: 24-12-2009, 12:59 AM
  3. What is the FileSystemObject and ASPError Object of ASP
    By Joel5 in forum Software Development
    Replies: 5
    Last Post: 23-12-2009, 04:45 AM
  4. Explain Response file in C-Sharp
    By KAMANA in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 04:17 AM
  5. What is JAR file? Please explain
    By Athos in forum Software Development
    Replies: 4
    Last Post: 02-03-2009, 05:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,941,300.53478 seconds with 17 queries