C
Chris Leffer
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
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