473,795 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1379
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnS tart in a global.asa file?

Ray at work

"MEM" <mm*****@citlin k.net> wrote in message
news:94******** *************** ***@posting.goo gle.com...
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_ons tart.

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


"MEM" <mm*****@citlin k.net> wrote in message
news:94******** *************** ***@posting.goo gle.com...
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******* *******@tk2msft ngp13.phx.gbl>. ..
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnS tart in a global.asa file?

Ray at work

"MEM" <mm*****@citlin k.net> wrote in message
news:94******** *************** ***@posting.goo gle.com...
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*****@citlin k.net> wrote in message
news:94******** *************** **@posting.goog le.com...
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******* *******@tk2msft ngp13.phx.gbl>. ..
Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnS tart in a global.asa file?

Ray at work

"MEM" <mm*****@citlin k.net> wrote in message
news:94******** *************** ***@posting.goo gle.com...
> 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
1560
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 2 runs in the iframe and at some point might decide to submit a form targeted to the _top frame, to page 3 on Server B. 4. Page 3 loads in the top frame. This usually works well, but occasionally when page 3 loads various asp
11
2771
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 other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the objects to call their constructors. This all works fine if no one is attempting to connect at the...
3
2516
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 should be stored in a global variable, but it shouldn't be possible to modify this variable. so what i tried first was using the application object to store that string. that was fine, but the problem is, that it can be modified from outside, so...
3
1923
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 thread, I think). During each request, only one of these objects is exposed to the page as Page.Application. This seems to be supported by the fact that when I use the debugger, I can see the Application_Start event firing more than one time even...
7
2171
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 got is a decodeImage.aspx page that gets called to decode base64 encoded images and return them as displayable images to a Web page. The ASPX page is passed two parameters, "file" and "img". The "file" parameter specifies and XML file on the Web...
20
4498
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 logic layer(so far so good and easy).I initialize my class which is using a FileSystemWatcher in my Global.asax and everything works fine.I have found FileSystemWatcher class not very reliable and sometimes it behavies unexpectedly.I'm afriad that...
8
4872
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 differences in the way both the objects are handled by IIS. Are both objects stored in different memory spaces? I can access both the objects in my web page. I will be grateful if some one can help me understand the difference.
9
39448
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 ticked for the application you want to Automate. Set up an application object variable to use (You can use With...End With if you prefer). Either : Use CreateObject(Class) to open a new object for multi-instance programs (For single Instance...
0
2215
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 Server 2000 We are having some problems with a website we are developing, and had some
4
4531
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 child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.