Home All Groups Group Topic Archive Search About

Static Variables Vanish

Author
11 Aug 2006 3:56 PM
moonliver
I have an asp.net application that uses a dll that has Shared/Static
members.

I thought that the values in the Shared/Static members should only
recycle if the application was restarted. but it seems that it is being
recycled after the session count falls to zero.

Does this sound right? Can I make the Shared/Static members persist
past zero sessions?

Author
11 Aug 2006 4:04 PM
Marina Levit [MVP]
After a certain period of inactivity, the application shuts down, and
restarts when it receives another request.

<moonli***@gmail.com> wrote in message
Show quoteHide quote
news:1155311768.990990.154540@75g2000cwc.googlegroups.com...
>I have an asp.net application that uses a dll that has Shared/Static
> members.
>
> I thought that the values in the Shared/Static members should only
> recycle if the application was restarted. but it seems that it is being
> recycled after the session count falls to zero.
>
> Does this sound right? Can I make the Shared/Static members persist
> past zero sessions?
>
Author
11 Aug 2006 6:27 PM
tomb
moonli***@gmail.com wrote:

>I have an asp.net application that uses a dll that has Shared/Static
>members.
>
>I thought that the values in the Shared/Static members should only
>recycle if the application was restarted. but it seems that it is being
>recycled after the session count falls to zero.
>
>Does this sound right? Can I make the Shared/Static members persist
>past zero sessions?
>

>
You can store the values in a text file, so the application can always
see them.  Any time the reference to that dll goes away, so do the
variables.

T