Solved

Do I need "sessionState" in webconfig when using Forms Authenrtication?

Posted on 2007-03-17
8
536 Views
Last Modified: 2011-10-31
I'm using Forms Authentication. In WebConfig I have:
 <sessionState timeout="30"  mode="InProc"></sessionState>
    </system.web>

But in Forms Authentication also has a cookie timeout like this:
<forms name="appNameAuth" path="/" loginUrl="login.aspx" protection="All" timeout="30">

So do I need that sessionState in webconfig??
0
Comment
Question by:Camillia
  • 3
  • 3
  • 2
8 Comments
 
LVL 22

Expert Comment

by:DarkoLord
ID: 18741893
No, you don't need it. It doesn't have any effect on forms authentication.
0
 
LVL 7

Author Comment

by:Camillia
ID: 18741928
even if I use sessions in the app?? for example, I have an id in a session...
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 18741958
I think the Forms Authentication is only for authentication cookie/session and sessionState for others (the default is 20 minutes)
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 7

Author Comment

by:Camillia
ID: 18741973
so, i do need it if I'm using session in the code...confused!
0
 
LVL 22

Accepted Solution

by:
DarkoLord earned 500 total points
ID: 18742898
If you want to change the default session timeout (20 minutes), then yes, otherwise no
0
 

Expert Comment

by:hongclub
ID: 37045845
i want to do the same thing too.

I set it everywhere in 1 minute, none of them working.
and i thought Web.Config <sessionState timeout="1"/> is the way to go, please advise,

 - Web.config: timeout property in <sessionState>
  - Machine.config: timeout property in <sessionState>
  - IIS - Connection Timeout for the Default Web Site
  - IIS - Session Timeout for MyWebSite set

tommy
0
 

Expert Comment

by:hongclub
ID: 37057952
so what is the solution?
in order to make it one hour:
you do this?
 <sessionState timeout="60"  mode="InProc"></sessionState>
    </system.web>

and also this
<forms name="appNameAuth" path="/" loginUrl="login.aspx" protection="All" timeout="60">

What else? it will do the job to extend to 1 hour?
0
 

Expert Comment

by:hongclub
ID: 37057956
so what is the solution?
in order to make it one hour:
you do this?
 <sessionState timeout="60"  mode="InProc"></sessionState>
    </system.web>

and also this
<forms name="appNameAuth" path="/" loginUrl="login.aspx" protection="All" timeout="60">

What else? it will do the job to extend to 1 hour?
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question