Forms Authentication with Session State

M

Max Q

Hey All.

Currently, I have a login page that creates an encrypted
Authentication Cookie (using FormsAuthenticationTicket).

This happens after the user has been successfully
authenticated by matching credentials in SQL Server
tables (not using Windows Authentication... just matching
login name and password to their user record within a
table in SQL Server).

I set the authticket to expire 20 minutes after it's been
created, and it uses the
FormsAuthentication.FormsCookieName to grab the cookie
name from web.config.

Now, I also have my session state (mode="InProc") timeout
set to 20 minutes in the web.config file...

This USED to work before for me, but now when the user
times out, it will NOT redirect to the login URL
specified in the web.config file (under the
authentication element)

here's a snapshot of my web.config file:

<authentication mode="Forms">
<forms
loginUrl="Insecure/Session_Expired_Redirect.aspx"
name="sqlAuthCookie" timeout="20" path="/"></forms>
</authentication>

Even if I set my session timeout to something earlier
(like 10 minutes), and put code in Session_End in the
Global.asax file to force a FormsAuthentication.SignOut
(), it STILL won't redirect to the loginURL specified in
the web.config.

Does anyone have any suggestions how I can
properly 'synchronize' Forms Auth and Session State in
this web app? (If you need more info let me know)
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top