4 Replies Latest reply on Feb 27, 2010 8:26 PM by silver..

    How do we know if the session is expired in asp.net?

    silver..

      Hi,

       

      How do we know if the session is expired in asp.net?

        • 1. Re: How do we know if the session is expired in asp.net?
          Matt Le Fevre Level 4

          don't suppose there is any risk of you going into a little bit more detail?

          • 2. Re: How do we know if the session is expired in asp.net?
            silver.. Level 1

            Hi,

             

            In asp.net we implement some sessions or login timeouts...

             

            In asp.net we can set a timeout in authentication tag.

             

            <authentication mode="Forms">

            <forms defaultURL="default.aspx" loginURL="login.aspx" timeout="3" />

             

            </authentication>

             

            when the authentcation or session expired and we interact with the buttons in asp.net the page will authomatically redirect to the login page.

             

            how do we implement this on flex...

            • 3. Re: How do we know if the session is expired in asp.net?
              Matt Le Fevre Level 4

              I've done this with PHP and flex, so i imagine it might be similar with asp

               

              whenever your flex app loads use an HTTPservice to an ASP script to verify if a session is already set. If the script detects a session already exists, return a value to the flex app indicating that a session is set and implement it so a positive value allows the user to skip the login phase. You could always use the HTTPservice to return session stored login credentials to the flex app for verification for extra security, and implement an auto-login that way.

               

              Obviously, if a session has not been set then the script should return a negative value to flex telling the app to continue with the normal login procedure.

               

               

              works the same way with cookies as well.

              • 4. Re: How do we know if the session is expired in asp.net?
                silver.. Level 1

                Actually the application is already done... unfortunately we don't have the solution for that application... so we can't edit the code.

                so i decided to make a small flex apps that will embed to the same application which the role of that is to check if the session/authentication is expired.

                 

                one i think is to make a timer that check if the session is expired... BUT when i call that page using httpservice it renew the session and authentication so it means that it never ends.

                 

                we need the session or authentication expiration to make the application secure.