Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > application level variables

Reply
Thread Tools

application level variables

 
 
RP
Guest
Posts: n/a
 
      11-02-2003
Hi all, I wanted to know if there are any limitations to storing some custom
objects I have written at application level to avoid having to
create/destroy with every request. These are not ado objects, just some
custom ones I have written with basically functions and method that do some
basic stuff - file i/o etc. I know there used to be limitations with classic
asp and application objects. Do the same apply to asp.net?

TIA,
RP


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-02-2003
The limitations have been mostly removed. If you wrap file I/O stuff or
connection objects remember to dispose of them correctly so that you don't
leak memory.

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"RP" <> wrote in message
news:#...
> Hi all, I wanted to know if there are any limitations to storing some

custom
> objects I have written at application level to avoid having to
> create/destroy with every request. These are not ado objects, just some
> custom ones I have written with basically functions and method that do

some
> basic stuff - file i/o etc. I know there used to be limitations with

classic
> asp and application objects. Do the same apply to asp.net?
>
> TIA,
> RP
>
>



 
Reply With Quote
 
 
 
 
RP
Guest
Posts: n/a
 
      11-03-2003
Thanks for the reply. So when is it recommended and when is it not
recommended to store commonly used objects at application state?

thanks!

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:...
> The limitations have been mostly removed. If you wrap file I/O stuff or
> connection objects remember to dispose of them correctly so that you don't
> leak memory.
>
> --
>
>
> -----------
> Got TidBits?
> Get it here: www.networkip.net/tidbits
> "RP" <> wrote in message
> news:#...
> > Hi all, I wanted to know if there are any limitations to storing some

> custom
> > objects I have written at application level to avoid having to
> > create/destroy with every request. These are not ado objects, just some
> > custom ones I have written with basically functions and method that do

> some
> > basic stuff - file i/o etc. I know there used to be limitations with

> classic
> > asp and application objects. Do the same apply to asp.net?
> >
> > TIA,
> > RP
> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      11-03-2003
Application objects have scope as long as the application is running. When a
first user logs in to the system, the application starts to run. It doesn't
terminate when the user logs off or closes the browser. It may stop for
example when IIS resets or when you explicitly terminate the application so
conceivably the application can be running for days. Do you want your
objects to persist that long? Its up to you. Objects in the application
object can be accessed by all aspx pages. These objects are not thread safe
so you will need to take the appropriate synchronization precautions just
like you do with global objects because that is what they are. There are
quite a number of articles on msdn to guide you thru.

regards.

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"RP" <> wrote in message
news:...
> Thanks for the reply. So when is it recommended and when is it not
> recommended to store commonly used objects at application state?
>
> thanks!
>
> "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:...
> > The limitations have been mostly removed. If you wrap file I/O stuff or
> > connection objects remember to dispose of them correctly so that you

don't
> > leak memory.
> >
> > --
> >
> >
> > -----------
> > Got TidBits?
> > Get it here: www.networkip.net/tidbits
> > "RP" <> wrote in message
> > news:#...
> > > Hi all, I wanted to know if there are any limitations to storing some

> > custom
> > > objects I have written at application level to avoid having to
> > > create/destroy with every request. These are not ado objects, just

some
> > > custom ones I have written with basically functions and method that do

> > some
> > > basic stuff - file i/o etc. I know there used to be limitations with

> > classic
> > > asp and application objects. Do the same apply to asp.net?
> > >
> > > TIA,
> > > RP
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      11-03-2003
The most important thing to remember is that, while you can still store
items in the Application Collection, it is not threadsafe, and it is
therefore recommended that you use the Application Cache, which was designed
specifically for ASP.Net instead.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"RP" <> wrote in message
news:...
> Thanks for the reply. So when is it recommended and when is it not
> recommended to store commonly used objects at application state?
>
> thanks!
>
> "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:...
> > The limitations have been mostly removed. If you wrap file I/O stuff or
> > connection objects remember to dispose of them correctly so that you

don't
> > leak memory.
> >
> > --
> >
> >
> > -----------
> > Got TidBits?
> > Get it here: www.networkip.net/tidbits
> > "RP" <> wrote in message
> > news:#...
> > > Hi all, I wanted to know if there are any limitations to storing some

> > custom
> > > objects I have written at application level to avoid having to
> > > create/destroy with every request. These are not ado objects, just

some
> > > custom ones I have written with basically functions and method that do

> > some
> > > basic stuff - file i/o etc. I know there used to be limitations with

> > classic
> > > asp and application objects. Do the same apply to asp.net?
> > >
> > > TIA,
> > > RP
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
RP
Guest
Posts: n/a
 
      11-03-2003
Good point. Thanks for the info.

"Kevin Spencer" <> wrote in message
news:...
> The most important thing to remember is that, while you can still store
> items in the Application Collection, it is not threadsafe, and it is
> therefore recommended that you use the Application Cache, which was

designed
> specifically for ASP.Net instead.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> Big Things are made up of
> Lots of Little Things.
>
> "RP" <> wrote in message
> news:...
> > Thanks for the reply. So when is it recommended and when is it not
> > recommended to store commonly used objects at application state?
> >
> > thanks!
> >
> > "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote

in
> > message news:...
> > > The limitations have been mostly removed. If you wrap file I/O stuff

or
> > > connection objects remember to dispose of them correctly so that you

> don't
> > > leak memory.
> > >
> > > --
> > >
> > >
> > > -----------
> > > Got TidBits?
> > > Get it here: www.networkip.net/tidbits
> > > "RP" <> wrote in message
> > > news:#...
> > > > Hi all, I wanted to know if there are any limitations to storing

some
> > > custom
> > > > objects I have written at application level to avoid having to
> > > > create/destroy with every request. These are not ado objects, just

> some
> > > > custom ones I have written with basically functions and method that

do
> > > some
> > > > basic stuff - file i/o etc. I know there used to be limitations with
> > > classic
> > > > asp and application objects. Do the same apply to asp.net?
> > > >
> > > > TIA,
> > > > RP
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
c is a low-level language or neither low level nor high level language pabbu C Programming 8 11-07-2005 03:05 PM
Is Cisco PIX Application level firewall or Packet level firewall? Learning Cisco Cisco 3 10-15-2005 12:55 AM
Application level roles + Item level roles... how to do it? Jéjé ASP .Net Security 0 09-26-2005 11:06 PM
Accessing higher security level from higher security level nderose@gmail.com Cisco 0 07-11-2005 10:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57