Connecting Tech Pros Worldwide Help | Site Map

Problem: Module's Friend variable shared across user sessions

Guest
 
Posts: n/a
#1: Nov 18 '05
We just learned [the hard way...in production] that a variable declared
Friend within a module can be shared across multiple user sessions.

Is there any way to declare a Friend variable within a module, so that it is
isolated to a single user session? Or should I revert to using session
variables?

Thanks,

Eric


Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#2: Nov 18 '05

re: Problem: Module's Friend variable shared across user sessions


For session scoped variables you should generally use the session object.
That's what it's there for.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


<Eric> wrote in message news:utqGqjbxEHA.1260@TK2MSFTNGP12.phx.gbl...[color=blue]
> We just learned [the hard way...in production] that a variable declared
> Friend within a module can be shared across multiple user sessions.
>
> Is there any way to declare a Friend variable within a module, so that it
> is
> isolated to a single user session? Or should I revert to using session
> variables?
>
> Thanks,
>
> Eric
>
>[/color]


Guest
 
Posts: n/a
#3: Nov 18 '05

re: Problem: Module's Friend variable shared across user sessions


Thank you, Steve. I went through my code and swapped the Friend references
with a Session variable, and it works fine.

Thanks again,

Eric

"Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
news:eHOv67bxEHA.2012@TK2MSFTNGP15.phx.gbl...[color=blue]
> For session scoped variables you should generally use the session object.
> That's what it's there for.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
> <Eric> wrote in message news:utqGqjbxEHA.1260@TK2MSFTNGP12.phx.gbl...[color=green]
> > We just learned [the hard way...in production] that a variable declared
> > Friend within a module can be shared across multiple user sessions.
> >
> > Is there any way to declare a Friend variable within a module, so that[/color][/color]
it[color=blue][color=green]
> > is
> > isolated to a single user session? Or should I revert to using session
> > variables?
> >
> > Thanks,
> >
> > Eric
> >
> >[/color]
>
>[/color]


Closed Thread


Similar ASP.NET bytes