5
votes

we are developing into an asp classic application introducing new asp.net pages. The session variables are shared through the login.asp, everything works fine... The problem that we are facing now is that the asp classic session expires meanwhile the user is navigating the .net pages and tries to go again into an asp page... the session in asp has expired because the user has been browsing for more than 20 minutes the aspx pages.

Thanks in advance Ariel Gimenez

3
What is the server platform that you're doing the development under? I seem to remember it was announced that there was an option in IIS7.x to share session state between classic ASP and ASP.Net. But I can't find supporting evidence of that.amber

3 Answers

3
votes

May be you can keep your Classic ASP session alive when a user browse in a ASPX page by:

  1. adding a hidden iframe in your ASPX page that load an ASP Page

    ' aspx page ....

    <iframe src='keep_session.asp' style='display:none'></iframe>

  2. OR use an AJAX post from your ASPX page every 10 minutes to an ASP page to keep the ASP session active

2
votes

I think you can find interesting:

http://msdn.microsoft.com/en-us/library/aa479313.aspx

update

I think this is the key:

"The native ASP session can only store session data in memory. In order to store the session data to SQL Server, a custom Microsoft® Visual Basic® 6.0 COM object is written to manage the session state instead of using the native session object. This COM object will be instantiated in the beginning of each Web request and reload the session data from SQL Server. When the ASP script is finished, this object will be terminated and the session state will be persisted back to SQL Server."

Do you retrieve asp session from db too?

1
votes

I can think of two ways around this:

  1. Increase the session timeout setting to be longer then 20 minutes.

  2. Add a redirect page between common pages of the .aspx navigation.
    This would redirect to an asp page, and then on to the correct destination, ensuring the session object didn't timeout.