Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ASP.net Session expiring before Authentication

  • 30-04-2010 11:18am
    #1
    Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭


    Hi,

    I'm working on an MVC 2 application which stores a few objects in Session when the user logs in.

    My problem is that even though I've set the session to expire at the same time as the forms authentication session, the session is expiring before that. So the result is that the session is null when it shouldn't be.

    Here's two of the relevant settings from my web.config:
    <authentication mode="Forms">
    			<forms loginUrl="~/Account/LogOn" timeout="30"/>
    		</authentication>
        <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="30"/>
    

    Anyone have any ideas how to get these to expire at the same time?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 2,494 ✭✭✭kayos


    John_Mc wrote: »
    Hi,
    <authentication mode="Forms">
    			<forms loginUrl="~/Account/LogOn" timeout="30"/>
    		</authentication>
        <sessionState mode="InProc" cookieless="false" timeout="30"/>
    

    Try that instead. You had configured some strange Hybrid of InProc, SQLServer and StateServer modes.

    http://msdn.microsoft.com/en-us/library/87069683(VS.71).aspx


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    kayos wrote: »
    Try that instead. You had configured some strange Hybrid of InProc, SQLServer and StateServer modes.

    http://msdn.microsoft.com/en-us/library/87069683(VS.71).aspx

    Hi,

    Many thanks for your reply. I tried that but the problem is still occurring. Nevertheless, still a good idea to get rid of redundant settings :)

    Any other suggestions?


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    whats the IIS timeout on your web project?


Advertisement