The problem with cold start - cookies not recognized

Discussion in 'General troubleshooting' started by AlbertTolokonnikov, Feb 7, 2013.

  1. Hi!

    I have problem with cookies when application first time start. Have not authentication and have not cookies.

    After application recycles in control panel on Winhost.com application work good.

    Until next start after long periods of inactivity. More than 30 minutes.

    Where search problem source?

    Thank you.
     
    Last edited by a moderator: Oct 14, 2015
  2. Can you post or PM me the URL where you are experiencing this issue so that we can take a look?
     
  3. New information.
    I did an experiment on local IIS with memory limit set to 5000 kB.
    This is normal url for my application from explore with cookie on

    http://localhost/tt.ttt.Web_deploy/

    this is url for explore with cookie off

    http://localhost/tt.ttt.Web_deploy/...))/default.aspx?AspxAutoDetectCookieSupport=1

    After recycle pool of application on first start after excess of memory limit all url return on all explorer (including explorer with cookie on) the same as with one session id (X(1)(lmhlvj143p2dkvpqevrs0li0)) and not work authentication. Close and open explores not help.
    If recyle application in IIS (not poll) url normalisation - for explore with cookie and for explorer without cookie, they work with different session id after reopen.

    If set memory limit to 10000 kB all explorers work normal.

    But our memory limit on Winhost 100 MB.
     
    Last edited by a moderator: Oct 14, 2015
  4. Last edited: Oct 14, 2015
  5. I send PM with url.

    I now about mode="SQLServer" but we have problem on start page without use session variable before any user authorization.

    And is very bad application after pool recycle return all clients same start page with one wrong session id in url.

    Thank you.
     
  6. :)
    This history start when i placed site on Winhost, more 2 years.
    I change useCookie to all variants and more.

    Problem in reboot our application pool when exceed memory limit. But we have 200 MB and reboot happen on first start application on first page and not happen pending all day when application reality work.

    This is very bad and very strange.

    Dear hosters! We need your help!
     
    Last edited by a moderator: Oct 14, 2015
  7. I checked your site again and it is not behaving the same as it was before, where you able to resolve this issue?

    Also, have you checked out the article on using SQL Session that Hank provided?
     
  8. Not. The problem exists. Site falls once every two or three days. Sometimes twice a day. This occurs during the first request after long periods of inactivity. Then the site is working properly.

    I think about the SQLserver. But we would like to know the cause restart. It is certainly not due to the fact where to store the session.
     
  9. I set mode=SQLserver and wait result.
     
  10. Right. Because your application pool is recycled after 20 minutes of inactivity. When that happens, any session that isn't stored outside of the application memory will be lost. That is the correct and expected behavior.
     
  11. Hank, i know this. But why application not recycling after recycling pool?
     
  12. mode=SQLserver do not help
    Now application is wrong.
    I d'not recycle application before tomorrow morning. You can look at it.

    I have in url
    /(S(31otfe55orw1pizdm2p3mj2c))/Default.aspx

    but i delete all from specific tables
    DELETE FROM [dbo].[ASPStateTempApplications]
    DELETE FROM [dbo].[ASPStateTempSessions]

    They is empty now.

    Where this SessionId S(31otfe55orw1pizdm2p3mj2c create and return my client?

    My web.config now

    <sessionState mode="SQLServer"
    allowCustomSqlDatabase="true"
    sqlConnectionString="MSP_SQLConnString"
    cookieless="UseCookies"
    timeout="20"
    sqlCommandTimeout="3000" />

    <trust level="Full" />

    <roleManager enabled="true"
    cacheRolesInCookie="true"
    cookieName=".MyRolesCookie"
    defaultProvider="MySqlRoleProvider"
    cookieTimeout="120"
    cookiePath="/"
    cookieRequireSSL="false"
    cookieSlidingExpiration="true"
    cookieProtection="All" >
    <providers>
    <remove name="MySqlRoleProvider" />
    <add connectionStringName="MSP_SQLConnString" name="MySqlRoleProvider" type="System.Web.Security.SqlRoleProvider" applicationName="/MSP" />
    </providers>
    </roleManager>

    <authentication mode="Forms">
    <forms name="MyCookieName"
    loginUrl="~/login.aspx"
    defaultUrl="~/Default.aspx"
    timeout="120"
    slidingExpiration="true"
    cookieless="AutoDetect" />
    </authentication>

    We need your help! What is to be done?
     

Share This Page