By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,733 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,733 IT Pros & Developers. It's quick & easy.

FBA & Session State

P: n/a
I use forms based authentication and I've been putting the username in
Session State (Session["UserName"]).

Then when a user posts I check that Session["UserName"] != null else I
Session.Abandon() and Response.Redirect("logon.aspx") since that seems like
a graceful way to handle timeouts, session state losses (bin directory was
updated for example).

This doesn't seem like a reliable way to do it though. I get weird things
happening like SOMETIMES if I close the browser, then re-open a link I can
access the page without logging in but then when I post (ie I hit submit or
such) it asks me to logon.

How should I be handling this.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You should really consider reading up on "Forms authentication" in asp.net.
That allows you to provide a login.aspx, handles timeouts, handles many of
the customizations..

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:Oy**************@TK2MSFTNGP12.phx.gbl...
I use forms based authentication and I've been putting the username in
Session State (Session["UserName"]).

Then when a user posts I check that Session["UserName"] != null else I
Session.Abandon() and Response.Redirect("logon.aspx") since that seems like a graceful way to handle timeouts, session state losses (bin directory was
updated for example).

This doesn't seem like a reliable way to do it though. I get weird things
happening like SOMETIMES if I close the browser, then re-open a link I can
access the page without logging in but then when I post (ie I hit submit or such) it asks me to logon.

How should I be handling this.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.