How to Load Website Properties and Store Them All at Once?

Discussion in 'ASP General' started by vunet, Jul 21, 2008.

  1. vunet

    vunet Guest

    I have some properties data to be loaded for the site use, such as:
    website url, admin email, mailing component to use, etc. for my ASP
    website. They will be stored in a database, or I also consider XML and/
    or .inc text file.
    What is the best practice to load them once when user starts website
    browsing and keep them until user leaves the site?
    I considered Global.asa, but I know there must be one per application.
    I may have 2 same applications or more under different directories
    thus more than 1 asa will be used.
    Should I use "session" or "application" objects and how to use them
    for my case?
    Should I consider XML or text file instead of database? How faster are
    they if I consider under 10 properties to store?
    Thanks for any advice.
     
    vunet, Jul 21, 2008
    #1
    1. Advertisements

  2. "vunet" <> wrote in message
    news:...
    > I have some properties data to be loaded for the site use, such as:
    > website url, admin email, mailing component to use, etc. for my ASP
    > website. They will be stored in a database, or I also consider XML and/
    > or .inc text file.
    > What is the best practice to load them once when user starts website
    > browsing and keep them until user leaves the site?
    > I considered Global.asa, but I know there must be one per application.
    > I may have 2 same applications or more under different directories
    > thus more than 1 asa will be used.
    > Should I use "session" or "application" objects and how to use them
    > for my case?
    > Should I consider XML or text file instead of database? How faster are
    > they if I consider under 10 properties to store?


    If you have multiple applications that wish to share settings then its best
    to store them in a DB.

    Load them into the application object on application start using the
    Global.asa.



    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Jul 22, 2008
    #2
    1. Advertisements

  3. vunet

    vunet Guest

    On Jul 22, 8:03 am, "Anthony Jones" <> wrote:
    > "vunet" <> wrote in message
    >
    > news:...
    >
    > > I have some properties data to be loaded for the site use, such as:
    > > website url, admin email, mailing component to use, etc. for my ASP
    > > website. They will be stored in a database, or I also consider XML and/
    > > or .inc text file.
    > > What is the best practice to load them once when user starts website
    > > browsing and keep them until user leaves the site?
    > > I considered Global.asa, but I know there must be one per application.
    > > I may have 2 same applications or more under different directories
    > > thus more than 1 asa will be used.
    > > Should I use "session" or "application" objects and how to use them
    > > for my case?
    > > Should I consider XML or text file instead of database? How faster are
    > > they if I consider under 10 properties to store?

    >
    > If you have multiple applications that wish to share settings then its best
    > to store them in a DB.
    >
    > Load them into the application object on application start using the
    > Global.asa.
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET


    If I use my app on a few other servers, then is it true I cannot use
    Global.asa without its modification? In other words, can I pack my app
    with Global.asa and distribute to whatever I want? I thought I cannot.
    Thanks.
     
    vunet, Jul 22, 2008
    #3
  4. vunet wrote:
    > On Jul 22, 8:03 am, "Anthony Jones" <> wrote:
    >> "vunet" <> wrote in message
    >>
    >>

    news:...
    >>
    >>> I have some properties data to be loaded for the site use, such as:
    >>> website url, admin email, mailing component to use, etc. for my ASP
    >>> website. They will be stored in a database, or I also consider XML
    >>> and/ or .inc text file.
    >>> What is the best practice to load them once when user starts website
    >>> browsing and keep them until user leaves the site?
    >>> I considered Global.asa, but I know there must be one per
    >>> application. I may have 2 same applications or more under different
    >>> directories thus more than 1 asa will be used.
    >>> Should I use "session" or "application" objects and how to use them
    >>> for my case?
    >>> Should I consider XML or text file instead of database? How faster
    >>> are they if I consider under 10 properties to store?

    >>
    >> If you have multiple applications that wish to share settings then
    >> its best to store them in a DB.
    >>
    >> Load them into the application object on application start using the
    >> Global.asa.
    >>
    >> --
    >> Anthony Jones - MVP ASP/ASP.NET

    >
    > If I use my app on a few other servers, then is it true I cannot use
    > Global.asa without its modification? In other words, can I pack my app
    > with Global.asa and distribute to whatever I want? I thought I cannot.


    I do it all the time. What gave you the idea that you couldn't?
    You cannot access another application's global.asa, but you can
    certainly copy the file into another application ...

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jul 22, 2008
    #4
  5. vunet

    vunet Guest

    On Jul 22, 10:23 am, "Bob Barrows [MVP]" <>
    wrote:
    > vunet wrote:
    > > On Jul 22, 8:03 am, "Anthony Jones" <> wrote:
    > >> "vunet" <> wrote in message

    >
    > news:...
    >
    >
    >
    >
    >
    > >>> I have some properties data to be loaded for the site use, such as:
    > >>> website url, admin email, mailing component to use, etc. for my ASP
    > >>> website. They will be stored in a database, or I also consider XML
    > >>> and/ or .inc text file.
    > >>> What is the best practice to load them once when user starts website
    > >>> browsing and keep them until user leaves the site?
    > >>> I considered Global.asa, but I know there must be one per
    > >>> application. I may have 2 same applications or more under different
    > >>> directories thus more than 1 asa will be used.
    > >>> Should I use "session" or "application" objects and how to use them
    > >>> for my case?
    > >>> Should I consider XML or text file instead of database? How faster
    > >>> are they if I consider under 10 properties to store?

    >
    > >> If you have multiple applications that wish to share settings then
    > >> its best to store them in a DB.

    >
    > >> Load them into the application object on application start using the
    > >> Global.asa.

    >
    > >> --
    > >> Anthony Jones - MVP ASP/ASP.NET

    >
    > > If I use my app on a few other servers, then is it true I cannot use
    > > Global.asa without its modification? In other words, can I pack my app
    > > with Global.asa and distribute to whatever I want? I thought I cannot.

    >
    > I do it all the time. What gave you the idea that you couldn't?
    > You cannot access another application's global.asa, but you can
    > certainly copy the file into another application ...
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.


    So if I understand this should be possible:

    my web site is under folder "mysite" and it contains Global.asa as in
    "mysite/Global.asa". I make 2 copies of my site like this:

    root/website1/mysite/
    and
    root/website2/mysite/

    where Global.asa will be under each mysite folder. Is this a correct
    idea? Please confirm. But then how does the server know where to find
    Global.asa? Especially if I have no access to web server admin rights?
    Thanks
     
    vunet, Jul 22, 2008
    #5
  6. vunet wrote:
    > On Jul 22, 10:23 am, "Bob Barrows [MVP]" <>
    > wrote:
    >> vunet wrote:
    >>> On Jul 22, 8:03 am, "Anthony Jones" <> wrote:
    >>>> "vunet" <> wrote in message

    >>
    >>

    news:...
    >>
    >>
    >>
    >>
    >>
    >>> If I use my app on a few other servers, then is it true I cannot use
    >>> Global.asa without its modification? In other words, can I pack my
    >>> app with Global.asa and distribute to whatever I want? I thought I
    >>> cannot.

    >>
    >> I do it all the time. What gave you the idea that you couldn't?
    >> You cannot access another application's global.asa, but you can
    >> certainly copy the file into another application ...
    >>

    > So if I understand this should be possible:
    >
    > my web site is under folder "mysite" and it contains Global.asa as in
    > "mysite/Global.asa". I make 2 copies of my site like this:
    >
    > root/website1/mysite/
    > and
    > root/website2/mysite/
    >
    > where Global.asa will be under each mysite folder. Is this a correct
    > idea? Please confirm. But then how does the server know where to find
    > Global.asa? Especially if I have no access to web server admin rights?
    > Thanks

    Sure, why not? As long as each one is defined as an application using
    IIS Manager, there is not issue here.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jul 22, 2008
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GS
    Replies:
    1
    Views:
    15,164
    Karl Seguin
    Jan 9, 2006
  2. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    621
    tdavisjr
    Jun 16, 2006
  3. why the lucky stiff
    Replies:
    5
    Views:
    208
    why the lucky stiff
    Sep 22, 2004
  4. Kyle Schmitt
    Replies:
    5
    Views:
    160
    Kyle Schmitt
    Jul 26, 2007
  5. Gancy
    Replies:
    4
    Views:
    333
    Rasto Levrinc
    Feb 3, 2005
Loading...

Share This Page