473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FBA & Session State

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
1 1368
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nikander Bruggeman | last post by:
I keep losing session state when I store UIPAB state in the SessionStateObject. The asp.net session state object itself stores it's state in SQL server, I'm using cookieless session state. This...
6
by: Jason Shohet | last post by:
2 questions for anyone who can answer: 1. in class declarations, I realize you have to use the NEW keyword if you want to declare & instantiate some class at the same time. Whats an advantage...
3
by: Jeremy | last post by:
I am relativly new to ASP.NET, and my question is this: Is it better to create a wrapper class that contains all the running settings for the application and then load that into the app state, or...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
2
by: Dave | last post by:
I have an application running on a 3 server webfarm running Windows 2003 with SQLServer Session state. After running for several hours, I started getting the following error. When I access each...
2
by: glenn | last post by:
Hi folks, I must be missing something here. I have an ASP page that I create a Session variable in as follows. Session ("name")="Joe" In an ASP.NET page in the same project and the same...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
2
by: =?Utf-8?B?VW1lc2huYXRo?= | last post by:
Hi, My application is running with two web server let say W1 & W2 and load balance controls the request to web servers . One of my application page pop up a new page and there I am using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.