3 Replies - 371 Views - Last Post: 13 June 2019 - 07:22 AM Rate Topic: -----

#1 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,165
  • Joined: 12-January 10

session state lost?

Posted 13 June 2019 - 05:17 AM

ok i have a site that must be up for a minimum of 10 hours. the issue is that after being idle for a few minutes, it seems the session is lost.

example:
so when i start using using the site it works but if i leave it idle for 5+ minutes and then go to enter information, the controls dont seem to function.

does anyone have any idea on what would cause this?

iis setting?

here is the web config:

 
 <pages enableSessionState="true">
      <namespaces>
 </pages>
    <sessionState mode="InProc" timeout="660" cookieless="false" ></sessionState>
   
  </system.web>




and

 <system.webServer>
    <modules>
      <remove name="TelemetryCorrelationHttpModule"/>
      <add name="TelemetryCorrelationHttpModule"
        type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation"
        preCondition="integratedMode,managedHandler"/>
      <remove name="Session" />
      <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="" />

    </modules>
  </system.webServer>

This post has been edited by DarenR: 13 June 2019 - 05:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: session state lost?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15160
  • View blog
  • Posts: 60,694
  • Joined: 12-June 08

Re: session state lost?

Posted 13 June 2019 - 07:08 AM

Is this happen on local machine or an actual deployed server? It may be a server setting as the IIS has a timeout setting too.

Default Web Site > Properties -> Home -> App Settings -> Config -> Options
Check the session state time-out, and set the session timeout val.


App Pools -> DefaultAppPool -> Prop
Performance tab -> Idle timeout set 'Shutdown worker processes after being idle' value


Larger than that - you really shouldn't have a session state that long, but instead looking at practical ways to work around it. (Server memory issues begin to crop up, and add in a large number of users .. yeah that adds up). Cookies.. keeping the information saved to a db, etc... but so it goes.

Options.
http://www.primaryob...b-applications/
https://www.codeproj...eout-in-ASP-NET
https://stackoverflo...sion-open-alive
http://www.beansoftw...ternatives.aspx
Was This Post Helpful? 0
  • +
  • -

#3 DarenR   User is offline

  • D.I.C Lover

Reputation: 624
  • View blog
  • Posts: 4,165
  • Joined: 12-January 10

Re: session state lost?

Posted 13 June 2019 - 07:21 AM

not sure how you found the following:

Default Web Site > Properties -> Home -> App Settings -> Config -> Options
Check the session state time-out, and set the session timeout val.


App Pools -> DefaultAppPool -> Prop
Performance tab -> Idle timeout set 'Shutdown worker processes after being idle' value


all mine shows is advanced settings

i had already tried the 1st link-- however we arent passing in any userid since it is a program that will be running on a manufacturing line that must stay open during the entire shift.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15160
  • View blog
  • Posts: 60,694
  • Joined: 12-June 08

Re: session state lost?

Posted 13 June 2019 - 07:22 AM

Bah.. sorry, I may have just happened to have an old server's IIS up.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1