Hi everyone
I'm sure this will sound like a pretty silly question to all of you who are old hands at web development. I have a 'default.aspx' page and a 'login.aspx' page. The idea is that when a user opens default.aspx, if they are not logged in, they will be redirected to login.aspx - where they will have to enter a valid user name and password (checked against a database).
Once successfully logged in, a FormsAuthenticationTicket is created - with an expiry time of 60 minutes, and they are redirected to the default.aspx page via the RedirectFromLoginPage method.
My code works fine - but how do I test that the cookie actually works? If a user has logged in in the past hour, I want them to be able to access the default.aspx page without having to log in again. When I run the project, it is sending me automatically to the login.aspx page - but is this just because its a new session? I'm not all that familiar with sessions etc.
If anyone could shed a bit of light on this for me, please?
Thanks as always
Craftor
I'm sure this will sound like a pretty silly question to all of you who are old hands at web development. I have a 'default.aspx' page and a 'login.aspx' page. The idea is that when a user opens default.aspx, if they are not logged in, they will be redirected to login.aspx - where they will have to enter a valid user name and password (checked against a database).
Once successfully logged in, a FormsAuthenticationTicket is created - with an expiry time of 60 minutes, and they are redirected to the default.aspx page via the RedirectFromLoginPage method.
My code works fine - but how do I test that the cookie actually works? If a user has logged in in the past hour, I want them to be able to access the default.aspx page without having to log in again. When I run the project, it is sending me automatically to the login.aspx page - but is this just because its a new session? I'm not all that familiar with sessions etc.
If anyone could shed a bit of light on this for me, please?
Thanks as always
Craftor