Ask a Question related to ASP.NET General, Design and Development.
-
Chris Leffer #1
Doubts about application variables
Hi.
Reading some Microsoft materials about asp.net I came into two doubts.
The following sentence is found on the topic "Application State" in the
NET Framework documentation:
"Calling Lock on the Application object causes ASP.NET to block attempts
by code running on other worker threads to access anything in
application state"
So, if I use Lock this way:
Application.Lock()
Application("myVar") = 10
Application.UnLock()
All the other application variables on my system are blocked too?
My second doubt relates to a sentence found on one of the Microsoft
asp.net official courses:
The topic about application variables says:
"The Application object is destroyed when all users have exited the Web
application and the Web
application is then unloaded."
To test this, I created some application variables in an asp.net
application, load them and then exited the application. When I run the
application again, the application variables are still there with the
more recent values. It seems to me that application variables are only
destroyed when their host is destroyed, in this case, the IIS process.
Can anyone help me to understand the above sentence?
Regards,
Chris Leffer
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Chris Leffer Guest
-
Problem with Application variables using Application.cfc
Hi guys, I'm using CFMX7 and with that the Application.cfc. I've defined the app variables using <cfset This.varname = "something"> I would like... -
DB Field name="application" and Application scope variables
Hi, There is DB Field application which overwrited ,as I see , Application scope variable Are there way to solve this problem without using... -
Help, .NET doubts.....
I have client sever application my client is windows based thin application and server has webService running. Right now Server serialized the data... -
ASP Application Variables
I am using IIS 6.0 and am trying to use application variables to track uasge. They work fine as long as there is an active client but about 20... -
Global variables - application variables vs include file
What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include... -
Rao #2
Re: Doubts about application variables
When you call Application.Lock and Application.Unlock, they are applied
only to the application variable in the current context.
The application state/variables are destroyed when the web application
is specifically unloaded..means stopping the IIS or web
application..Even if there are no active users accessing the web server,
the application state/variables are preserved until the web application
is stopped...that is how we generally keep track of the number of
visitors to a particualr web site.
Hope this helps...
--Rao
Rao Guest



Reply With Quote

