Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

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

Question posted by: vunet (Guest) on July 21st, 2008 03:05 PM
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.
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Anthony Jones's Avatar
Anthony Jones
Guest
n/a Posts
July 22nd, 2008
12:15 PM
#2

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

"vunet" <vunet.us@gmail.comwrote in message
news:5c0b9c1d-1ac0-45ba-beaf-7b33c09ef4ac@f36g2000hsa.googlegroups.com...
Quote:
Originally Posted by
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



vunet's Avatar
vunet
Guest
n/a Posts
July 22nd, 2008
01:25 PM
#3

Re: How to Load Website Properties and Store Them All at Once?
On Jul 22, 8:03*am, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
Originally Posted by
"vunet" <vunet...@gmail.comwrote in message
>
news:5c0b9c1d-1ac0-45ba-beaf-7b33c09ef4ac@f36g2000hsa.googlegroups.com...
>
Quote:
Originally Posted by
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.

Bob Barrows [MVP]'s Avatar
Bob Barrows [MVP]
Guest
n/a Posts
July 22nd, 2008
02:35 PM
#4

Re: How to Load Website Properties and Store Them All at Once?
vunet wrote:
Quote:
Originally Posted by
On Jul 22, 8:03 am, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
Originally Posted by
>"vunet" <vunet...@gmail.comwrote in message
>>
>>

news:5c0b9c1d-1ac0-45ba-beaf-7b33c09ef4ac@f36g2000hsa.googlegroups.com...
Quote:
Originally Posted by
Quote:
Originally Posted by
>>
Quote:
Originally Posted by
>>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.



vunet's Avatar
vunet
Guest
n/a Posts
July 22nd, 2008
04:05 PM
#5

Re: How to Load Website Properties and Store Them All at Once?
On Jul 22, 10:23*am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
Quote:
Originally Posted by
vunet wrote:
Quote:
Originally Posted by
On Jul 22, 8:03 am, "Anthony Jones" <A...@yadayadayada.comwrote:
Quote:
Originally Posted by
"vunet" <vunet...@gmail.comwrote in message

>
news:5c0b9c1d-1ac0-45ba-beaf-7b33c09ef4ac@f36g2000hsa.googlegroups.com...
>
>
>
>
>
Quote:
Originally Posted by
Quote:
Originally Posted by
>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?

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

>
Quote:
Originally Posted by
Quote:
Originally Posted by
Load them into the application object on application start using the
Global.asa.

>
Quote:
Originally Posted by
Quote:
Originally Posted by
--
Anthony Jones - MVP ASP/ASP.NET

>
Quote:
Originally Posted by
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

Bob Barrows [MVP]'s Avatar
Bob Barrows [MVP]
Guest
n/a Posts
July 22nd, 2008
04:35 PM
#6

Re: How to Load Website Properties and Store Them All at Once?
vunet wrote:
Quote:
Originally Posted by
On Jul 22, 10:23 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
Quote:
Originally Posted by
>vunet wrote:
Quote:
Originally Posted by
>>On Jul 22, 8:03 am, "Anthony Jones" <A...@yadayadayada.comwrote:
>>>"vunet" <vunet...@gmail.comwrote in message

>>
>>

news:5c0b9c1d-1ac0-45ba-beaf-7b33c09ef4ac@f36g2000hsa.googlegroups.com...
Quote:
Originally Posted by
Quote:
Originally Posted by
>>
>>
>>
>>
>>
Quote:
Originally Posted by
>>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.



 
Not the answer you were looking for? Post your question . . .
184,182 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors