Application.

Well for one, it's gonna behave like a global variable which means you get
to experience all the pain and issues of global variables. bad bad bad.

Secondly, even if your application is done with the object, it cannot be
garbage collected because the application still maintains a reference to it.
Why is this important, well you get to have memory sitting around not being
used and not being reclaimed. This is not scalable.

"Northern" <lifeng26@msn.com> wrote in message
news:061901c34cd6$ec1e0ad0$a401280a@phx.gbl...
> I defined a public reference to an object in one of my
> module, say, ModuleA.vb. Then I instantiated the object in
> my Global.asax's Session Start event and assign it to the
> public reference I created.
>
> My question: what's the scope of this reference? session
> level, or application level? Please note here that I am
> NOT using an Session (or Application) variable. Seems like
> that it works -- I can access the value set in Global.asax
> from my ASP.Net pages. If I can do it this way, why do I
> need a Session? What's the difference here?
>
> Please help!
>
> Thanks a lot.