Forms Authentication and Session Variables

S

Schultz

I am having two problems in the application I am building, the first
has to do with forms authentication.

The application has three different login pages:
1- for admins
2- for users
3- for guest access (to view data entered by the users)

Each page is programmed to create a custom forms authentication cookie
that stores what access level they are, which would prevent a guest
from accessing an admin page, etc. When I tested the guest, user, and
admin logins, individually, and I could access each page that i
protected. How do fix this problem?

Another problem I have is that when users login, i store information in
session variables. Why do the session variables delete after, accessing
several pages, within the session time limit, or recieving an error?

Thanks for your help,
Schultz
 
J

Joe Fallon

As far as losing the Session variables - if you run InProc then you will
lose them when ASP.Net recycles itself.
This can happen at any time.
Many people recommend not using InProc sessions for Production applications.
If you use a State Server (RAM) then you will not lose the data when ASP.Net
gets recycled since it is out of process.
You could also use a SQL Server database to store the data. (In ver 2.0 I
think you can use any DB.)
 
J

Joe Fallon

Yep.
It can even be on the same box.
Just enable the service and fill in the IP address in the web.config file.
 

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
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top