Assume you mean in an HttpModule....
You should note Session state is not available in the BeginRequest event
of an HttpModule, it will not have been loaded, session state is only
available after the AcquireRequestState event.
You can either choose to do your processing later, after the
AcquireRequestState event or you can implement an alternative strategy.
I have used HttpContext.Current.Cache and stored session data that is
required in the beginrequest event in a hashtable with each hashtable
indexed using the sessionID which can be retrieved from the session
cookie (HttpContext.Current.Request.Cookies["ASP.NET_SessionId"].Value).
I am sure this is not the ideal solution but it works well and solved me
no end of headaches!
HTH
Matt
"The Clansman" <Yeah! Send me spam!! I love it!! But send the porn
ones....> wrote in message news:Oz**************@tk2msftngp13.phx.gbl...
Hi,
does anyone know how can I use the Session inside a module?? I tried
Dim Session As System.Web.SessionState.HttpSessionState
but I got an error......
thanks,
Bruno