I have a question about the ASP.NET architecture and how
classes are instantiated.
When a web page invokes a static class and the class uses
some static storage within the class, does the static
storage exist beyond the invocation of the web page? Is
the static storage global and available to all threads
that might invoke the static class?
Robert Millman 4 1010
Static classes are stored in the application heap, which means that values
in a static class are persistent for the lifetime of the application and are
accessible to all objects in the application. Static classes are not
instantiated, meaning that there is only one copy of the class.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Robert Millman" <RM******@AllscriptsOL.com> wrote in message
news:0c****************************@phx.gbl... I have a question about the ASP.NET architecture and how classes are instantiated.
When a web page invokes a static class and the class uses some static storage within the class, does the static storage exist beyond the invocation of the web page? Is the static storage global and available to all threads that might invoke the static class?
Robert Millman
> Static classes are stored in the application heap, which means that values in a static class are persistent for the lifetime of the application and
are accessible to all objects in the application. Static classes are not instantiated, meaning that there is only one copy of the class.
Beware of the dreadful process recycling feature of ASP.net though... (see
machine.config / search for "ProcessModel")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <bi******@kagi.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion http://www.kagi.com/birbilis
+ Robotics http://www.mech.upatras.gr/~robgroup
.................................................. .......................
Thanks for the replies. Yes, I do understand the process
recyling issues. However, except for out of process or
database based session state, does not process recycling
affect everything the same way (i.e. application state,
cache, static objects and storage, etc)? If the process
recycles, everything is wiped! Correct??
Robert Millman -----Original Message----- Static classes are stored in the application heap,
which means that values in a static class are persistent for the lifetime of
the application andare accessible to all objects in the application. Static
classes are not instantiated, meaning that there is only one copy of
the class. Beware of the dreadful process recycling feature of
ASP.net though... (seemachine.config / search for "ProcessModel")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ George Birbilis <bi******@kagi.com> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + QuickTime VCL and ActiveX controls (for
PowerPoint/VB/Delphi etc.)+ Plugs VCL and ActiveX controls (InterProcess/Internet
communication)+ TransFormations, VB6 forms to ASP.net WebForms
convertionhttp://www.kagi.com/birbilis + Robotics http://www.mech.upatras.gr/~robgroup ................................................. ........
.................
.
Wen an Application Pool is recycled, yes, all process memory is wiped clean.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Robert Millman" <RM******@allscriptsOL.com> wrote in message
news:08****************************@phx.gbl... Thanks for the replies. Yes, I do understand the process recyling issues. However, except for out of process or database based session state, does not process recycling affect everything the same way (i.e. application state, cache, static objects and storage, etc)? If the process recycles, everything is wiped! Correct??
Robert Millman
-----Original Message----- Static classes are stored in the application heap, which means that values in a static class are persistent for the lifetime of the application andare accessible to all objects in the application. Static classes are not instantiated, meaning that there is only one copy of the class. Beware of the dreadful process recycling feature of
ASP.net though... (seemachine.config / search for "ProcessModel")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ George Birbilis <bi******@kagi.com> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)+ TransFormations, VB6 forms to ASP.net WebForms convertionhttp://www.kagi.com/birbilis + Robotics http://www.mech.upatras.gr/~robgroup ................................................. ........ ................
.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nospam |
last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types,
so, since it seems to me that Partial Types is still in the design or
development stages at Microsoft, I am going to ask...
|
by: Ambarish Ganguly |
last post by:
Hi,
We are planning for a 3 tier architecture with
Web server
App server containing all business dlls
Database server.
The web server will communicate using COM interop ( CreateObject sort...
|
by: Tim |
last post by:
Hello everyone. I visit this board pretty regularly but have never
posted. My question is an application architecture question... so
hopefully it's okay to post in the dotnet general forum.
I...
|
by: hans |
last post by:
Hi!
I am new to .NET (coming from Java). We have to implement a desktop
application which extracts data from a database, does some analysis,
filtering etc. and displays the results.
I have...
|
by: Steve Jorgensen |
last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of
multiple parameters in a Property Let procedure to pass dimensional
arguments on the basis that, although it works, it's...
|
by: dilip ranganathan |
last post by:
Howdy All
I have a quick question on an architecture I am trying to implement.
I want to implement something similar to a pub-sub architecture. Is
it possible to broadcast event notifications...
|
by: Ken H |
last post by:
Hi I have a question about architecting solutions..
I have a part of a project which requires me to track person details (name, addresses, etc...
Should I be creating Person objects, Address...
|
by: John A |
last post by:
I have a Web Service that I am reponsible for that we use for data
integration purposes. Recently I have been tasked with sending some of this
data to a third party. Because they need to receive...
|
by: Ken Ross |
last post by:
I'm in the early stages of working up the design for a large .Net web
application and want to make sure that we have the best possible physical
architecture to support the logical architecture and...
|
by: rw2007 |
last post by:
I'd like to hear what you think about this...
I'm working on a new architecture for an existing software product. I want this to be a flexible - and especially extendable - architecture for future...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |