473,385 Members | 1,647 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,385 software developers and data experts.

Question about ASp.NET Architecture

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
Nov 18 '05 #1
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

Nov 18 '05 #2
> 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
.................................................. .......................
Nov 18 '05 #3

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 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... (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
................................................. ........ .................

.

Nov 18 '05 #4
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 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
................................................. ........

................


.

Nov 18 '05 #5

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

Similar topics

7
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...
1
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...
6
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...
2
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...
55
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...
1
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...
3
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...
2
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...
2
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...
0
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...
0
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...
0
isladogs
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...
0
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...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.