Odd session timeout in hosting plan.

Last post 06-08-2007 10:16 AM by Rahul.net. 5 replies.

Sort Posts:

  • Odd session timeout in hosting plan.

    06-05-2007, 5:55 AM
    • Loading...
    • famous
    • Joined on 04-26-2005, 1:17 PM
    • Greece
    • Posts 66

    We developed an ASP.NET 2.0 application which is using a MySQL 4 database using the .NET Mysql connector.
    The application uses forms authentication for user login and during development it worked fine.

    Recently we host the application on a service provider, but after user logs in and having the application idle for about 5 minutes the session timouts and it redirects to the login page. The application uses a session variable where the username is stored about the user who logged in. The web.config section about session is the following:

    <authentication mode="Forms"><forms loginUrl="Default.aspx" defaultUrl="Main.aspx"

    timeout="20" />

    </
    authentication>

    <sessionState mode="InProc" stateConnectionString="tcpip=localhost:42424" timeout="20" />

    Unfortunately the session does not last 20 minutes as specified but mostly 5 min. I tried StateServer mode instead of InProc changing the mode command in session state tag but the result is exactly the same.

    I talked with the technical support to verify that no antivirus software is scanning the bin folder and they assured me about that. They also told me that the problem is caused by a problem in the application code and there's nothing more they can do! What's odd is that stateserver causes timeout of the session in about 5 minutes also.

    I'm really stuck. Is there a solution to that, or do I have to find for another more valuable hosting provider

    Thank you.

    <!-- famous -->
    Filed under: , , ,
  • Re: Odd session timeout in hosting plan.

    06-06-2007, 11:11 PM

    Hi, famous: 

    Try to configure shutiing down time worker process after being idle according to the document:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...


    The default time when the worker process will shut down after being idle for is 20 mins.
    If you set session timeout for 1440s and it works in InProc mode,that is to say 24mins,maybe the worker process will restart after being idle for 20 mins,once the worker process restarts, the session data will be lost and it wil expire before the time setting in web.config.

    I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

     

    Best Regards,
    __________________________________________________
    Sincerely,
    Rex Lin
    Microsoft Online Community Support

    If there is any question or the issue is not resolved, please feel free to mark the thread as not resolved
  • Re: Odd session timeout in hosting plan.

    06-07-2007, 9:18 AM

    This is because you are on shared hosting !!! The session variable here will depend on many things server side. For example, when the application pool recycle your sessions will be killed. This will happen in any overloaded shared hosting server...

     

    Regards
     

  • Re: Odd session timeout in hosting plan.

    06-08-2007, 4:09 AM
    • Loading...
    • famous
    • Joined on 04-26-2005, 1:17 PM
    • Greece
    • Posts 66

    Rex Lin - MSFT:

    Hi, famous: 

    Try to configure shutiing down time worker process after being idle according to the document:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...


    The default time when the worker process will shut down after being idle for is 20 mins.
    If you set session timeout for 1440s and it works in InProc mode,that is to say 24mins,maybe the worker process will restart after being idle for 20 mins,once the worker process restarts, the session data will be lost and it wil expire before the time setting in web.config.

    I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

     

    Thank you very much for your reply.
    Well, unfurtunately due to shared hosting I do not have access to advanced IIS configuration e.g. the application pool.

    I tried the StateServer mode but unfortunately I have the same issue. When in StateServer mode the application still depends on the worker process, like the InProc mode?
    I want to contact the hosting company for the issue but I do not know what to tell them to setup. I try to figure out the reason this is happening. They claim that there's nothing more for them to setup. No

    Oh the url you specify is not working

    <!-- famous -->
  • Re: Odd session timeout in hosting plan.

    06-08-2007, 5:38 AM

    Tell them to isolate your domain into a new application pool.

    Also, make sure that they don't use the web garden feature.

     

    Regards 

  • Re: Ordering DataGriD view ---

    06-08-2007, 10:16 AM
    • Loading...
    • Rahul.net
    • Joined on 06-08-2007, 9:54 AM
    • Posts 2
    I'm developing windows Application using C#... The App is basically a search app. when a support user(assume the support Gal  :)  )  searches for specific record... the query returns say some 100 rows and i display those data in a DATAGRIDVIEW control... I need couple of things in this.:1). In my Windows Form  i have two buttons for sorting the Queue say like UP and DOWN arrow. -          The user will select a single row in the Search Results list and then select the “Up” or “Down” navigation buttons to order the jobs      --->        The “UP” navigation button will update the database to indicate the order this job will be executed (decrement the order by 1)        --->    The “UP” navigation button will move single jobs up in the queue by 1 row, causing the Search Results to refresh showing the new location of the selected job and vice  - versa on click  of the DOWN arrow...((increment the order by 1)) 2)    when the user click UP arrow she should be able to go directly to the row where the Status is of type Queued and the place the selected row before this  (queued ) row.. The columns i have: JobType          Country           TimeStarted              TimeFinshed                StatusCP                 SA                   "2007-02-17       "2007-05-07       Success00:00:00.000"     00:00:00.000" IP                  NA                  "2007-02-17       "2007-02-18       Queued00:00:00.000"     00:00:00.000" PP                 FR                   "2007-02-16       "2007-02-17       Failed00:00:00.000"     00:00:00.000" PG                 IN                    "2007-02-17       "2007-02-19       Queued00:00:00.000"     00:00:00.000" -          The “Up” and “Down” navigation buttons only apply to jobs that are of a status “Queued” 

    Pls help me out ... I am desperate and my life sucks here....

     

    I ahve repllied to ur article bcoz  i am not able to create my own post in this site....  

     

Page 1 of 1 (6 items)
Microsoft Communities
Page view counter