Session with Forms authentication

S

Salim Afþar

Hi,
I use Forms Authentication type in my project.When I start my app. in the
browser it works well.First it redirects the login page and after I enter
the password it redirects my administration page(again it's OK).I get the
user details and add to Session object in login page and I get the details
in administration page from Session object:
string sUserType=Session["UserType"].ToString();

But if I try the same processes second time it displays an error like this:

System.NullReferenceException: Object reference not set to an instance of an
object.

string sUserType=Session["UserType"].ToString();

Any help will appreciated kindly.

Thanks a lot.

Salim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top