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

V

vunet

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.
 
A

Anthony Jones

vunet said:
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.
 
V

vunet

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.

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.
 
B

Bob Barrows [MVP]

vunet said:
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 ...
 
V

vunet

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
 
B

Bob Barrows [MVP]

vunet said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top