S
- Steve -
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.
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.