Link to home
Start Free TrialLog in
Avatar of hema3i
hema3i

asked on

Access session in Application_AuthenticateRequest

i want to access session object in Application_AuthenticateRequest when i tries to it returns null

. how to do ?

or other wise is there any global place for the wole application to access the session object every time the user goes to a new page
YES in web.config saved in root directory of application

<configuration>
  <system.web>
    <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" />
  </system.web>
</configuration>

OR

<configuration>
  <system.web>
    <sessionState
       mode="SQLServer"
       sqlConnectionString="Server=127.0.0.1;UID=sa;PWD=secret" />
  </system.web>
</configuration>
ASKER CERTIFIED SOLUTION
Avatar of alecpotts
alecpotts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

I believe my answer is technically accurate - of course I don't know if it helped or not...!

IMO the answer from skvikram describes how to set up your session state in different ways, but not how to access it.

The last (and to a lesser extent, the first) link provided by pradeepsudharsan describe a similar problem, so could have been useful also.

Alec