473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

ASP Application Object

MEM
Hello,

I'm using application variables for a web based sales tracking
application. I use the variables for stuff like connection string,
database name, etc. I store the values in a asp file that is included
in a login page. The assignments are in a routine/procedure that I
then call on the login page. This is done everytime a user connects to
the login page.

So, what's happening to the variables? Are they being overwritten
everytime a user accesses the page? I'm not checking for the existence
of the variables. I just call the routine everytime the page is
accessed. I know the values are shared for all users but, I was
wondering if I should check for the existence of the variables? Will
it free up resources? Should I be using locks?

Thanks.
Jul 22 '05 #1
4 1361
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnStart in a global.asa file?

Ray at work

"MEM" <mm*****@citlink.net> wrote in message
news:94**************************@posting.google.c om...
Hello,

I'm using application variables for a web based sales tracking
application. I use the variables for stuff like connection string,
database name, etc. I store the values in a asp file that is included
in a login page. The assignments are in a routine/procedure that I
then call on the login page. This is done everytime a user connects to
the login page.

So, what's happening to the variables? Are they being overwritten
everytime a user accesses the page? I'm not checking for the existence
of the variables. I just call the routine everytime the page is
accessed. I know the values are shared for all users but, I was
wondering if I should check for the existence of the variables? Will
it free up resources? Should I be using locks?

Thanks.

Jul 22 '05 #2
I think you are confusing application and session. Sessions survive the
lifetime of a user connected to the application. The application outlasts
user sessions. It would make more sense, as Ray suggests, to populate these
variables in application_onstart.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"MEM" <mm*****@citlink.net> wrote in message
news:94**************************@posting.google.c om...
Hello,

I'm using application variables for a web based sales tracking
application. I use the variables for stuff like connection string,
database name, etc. I store the values in a asp file that is included
in a login page. The assignments are in a routine/procedure that I
then call on the login page. This is done everytime a user connects to
the login page.

So, what's happening to the variables? Are they being overwritten
everytime a user accesses the page? I'm not checking for the existence
of the variables. I just call the routine everytime the page is
accessed. I know the values are shared for all users but, I was
wondering if I should check for the existence of the variables? Will
it free up resources? Should I be using locks?

Thanks.

Jul 22 '05 #3
MEM
What's the benefits of using the global.asa file versus an asp
include? Also, when creating the application folder in IIS, does it
automatically create a global.asa file?

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<Oo**************@tk2msftngp13.phx.gbl>...
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnStart in a global.asa file?

Ray at work

"MEM" <mm*****@citlink.net> wrote in message
news:94**************************@posting.google.c om...
Hello,

I'm using application variables for a web based sales tracking
application. I use the variables for stuff like connection string,
database name, etc. I store the values in a asp file that is included
in a login page. The assignments are in a routine/procedure that I
then call on the login page. This is done everytime a user connects to
the login page.

So, what's happening to the variables? Are they being overwritten
everytime a user accesses the page? I'm not checking for the existence
of the variables. I just call the routine everytime the page is
accessed. I know the values are shared for all users but, I was
wondering if I should check for the existence of the variables? Will
it free up resources? Should I be using locks?

Thanks.

Jul 22 '05 #4
benefits vs an include? well, they're two different animals, but basically a
global.asa runs at the start of the session and the start of an application,
so it's the logical place to set app and session variables which don't
depend on some sort of user input.

no, a global.asa is not created automatically by IIS, but may be created by
your editor, depending on what you use
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"MEM" <mm*****@citlink.net> wrote in message
news:94*************************@posting.google.co m...
What's the benefits of using the global.asa file versus an asp
include? Also, when creating the application folder in IIS, does it
automatically create a global.asa file?

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:<Oo**************@tk2msftngp13.phx.gbl>...
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnStart in a global.asa file?

Ray at work

"MEM" <mm*****@citlink.net> wrote in message
news:94**************************@posting.google.c om...
> Hello,
>
> I'm using application variables for a web based sales tracking
> application. I use the variables for stuff like connection string,
> database name, etc. I store the values in a asp file that is included
> in a login page. The assignments are in a routine/procedure that I
> then call on the login page. This is done everytime a user connects to
> the login page.
>
> So, what's happening to the variables? Are they being overwritten
> everytime a user accesses the page? I'm not checking for the existence
> of the variables. I just call the routine everytime the page is
> accessed. I know the values are shared for all users but, I was
> wondering if I should check for the existence of the variables? Will
> it free up resources? Should I be using locks?
>
> Thanks.

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: OsD | last post by:
I'm having trouble with the workflow described bellow: 1. Asp page 1 on server A contains an iframe. 2. Asp page 1 submits a form targeted to the iframe, to Asp page 2 on server B. 3. Asp page...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
3
by: Patrick | last post by:
Hi I have the following problem. When starting my asp.net application, i read a encrypted string from a file, decrypt it and want this values to be available in the complete application. they...
3
by: SL | last post by:
All, As I understand it, a single application (i.e. IIS virtual directory) in ASP.NET may in fact have more than one corresponding HttpApplicationState object (more or less one per server...
7
by: Greg Collins [MVP] | last post by:
Hi, I couldn't find what I was looking for by searching the newsgroup, but perhaps these have already been discussed somewhere. This is a bit long with a lot of interrelated questions. What I've...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
9
NeoPa
by: NeoPa | last post by:
In VBA (I expect VB would be similar) controlling another Office Application (Automation) can be done using the following steps : Ensure the Reference (VBA Window / Tools / References) has been...
0
by: =?Utf-8?B?SkhhbGV5?= | last post by:
Our system is: IIS Server: dual Intel Xeon 2.80 GHz, 4 GB Ram Windows Server 2003 SP2 IIS 6.0 SQL Server: dual Intel Xeon 2.80 GHz, 4 GB Ram (separate server) Windows Server 2003 SP2 SQL...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.