Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Global.asa

Options
  • 08-06-2003 11:11pm
    #1
    Registered Users Posts: 604 ✭✭✭


    Ok quick question.
    whats the story with the global.asa, can a host have more than one.
    If i put a global.asa in the root Directory of my site and upload it to a server will it work correctly for my site. or can there be only one on the Host.


Comments

  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    I think its one per IIS application space.

    A host can have many virtual sites or Web in IIS speak. A virtual site can have many virtual directories.

    Each virtual directory or virtual site can have its own application space, so, potentially, you can have many global.asa's per host.

    HTH
    .cg


  • Moderators, Politics Moderators Posts: 39,950 Mod ✭✭✭✭Seth Brundle


    The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an ASP application - the application generally being a website or a folder marked as an application on the webserver.
    e.g. http://www.4guysfromrolla.com/webtech/113098-1.shtml


  • Closed Accounts Posts: 1,322 ✭✭✭phobos


    Yep you can have many Global.asa files on an IIS host. A Global.asa file "is" an optional part of any web application/project. Many of those can potentially exist on any given host. A Global.asa script can be used to define event handlers for application & session object lifecycle events for example. Also it is to exist in the context root dir of the web app that uses it.

    HTH

    ;-phobos-)


  • Registered Users Posts: 604 ✭✭✭Kai


    Thanks to those who replied for clearing that up. ive read a load of things about it but none of them actually cleared up whether you can have more than one.


  • Moderators, Politics Moderators Posts: 39,950 Mod ✭✭✭✭Seth Brundle


    Given that it sets application variables (application can be taken as a website) then what would the point be in having more than one declaration of the variables. If you need to declare loads of stuff, say when the application starts then add them all into the global.asa located in the root folder


  • Advertisement
  • Registered Users Posts: 604 ✭✭✭Kai


    true but what if the Host has several sites and are unwilling to make changes to the global.asa in the root folder.
    id prefer to have "my own" in the root folder of my site and make changes as i see fit.


  • Moderators, Politics Moderators Posts: 39,950 Mod ✭✭✭✭Seth Brundle


    I re-read the posts and I cannot see where you are mis-interpreting our statements.
    Your host would be running Microsoft IIS server with many websites!
    Each website is an application on the IIS server!
    Each application can have one global.asa!
    The global.asa file goes in the root folder where you place your sites homepage!
    Your webhost will have nothing to do with your asa file - no more than they would with your homepage! It is your file and will not affect anyone elses website! It is used to set application (your website) wide variables.


  • Registered Users Posts: 604 ✭✭✭Kai


    Dont worry about it boy. me question was answered anyway and im too tired to go into it.
    Basically before i asked the question i thought that there was only 1 global.asa per host which managed all websites on that host.


Advertisement