Session

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am using Session in my application.

I am setting the session when the User logs in, I am adding the User details
in a user object and storing in a session variable.
Session("csUser") = csUser

When i Redirect to the Next page after setting the Session.

In the next page the Session variable contains Nothing (some times it is
SET) !!

Why is this ON and OFF behaviour??

I am facing this kind of problem with session for 1st time??

Thanks
vinay
 
Hi vinay,

Normally, this should not happen. Check two things;

1) Are you sure that the session does not expire?
2) Is your redirection to another server or another application?
3) Are you sure that you don't set this variable in the session to Nothing
somewhere else in the cycle?

If you can answer "no" to these questions above, then you will have to
present some code here.

Ethem Azun
 
To the original poster:
1. Make sure that the client being used is supports cookies.
2. Make sure that you have not turned off Sessions within your web.config.
 
One scenario is

The place i am setting the session is a Baseclass ( .cs file) which i am
inheriting.

But when i go to the nextpage, i am NOT inheriting the Baseclass .

Is that an issue that i am not inheriting the class??
As per my understanding, when a session is SET, it should be accessiable
from any page irrespective of wheather its inheriting the Baseclass or
not????

Please clarify, bit confused now!!
 
Back
Top