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 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


    this is url for explore with cookie off


    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

    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"
    sqlCommandTimeout="3000" />

    <trust level="Full" />

    <roleManager enabled="true"
    cookieProtection="All" >
    <remove name="MySqlRoleProvider" />
    <add connectionStringName="MSP_SQLConnString" name="MySqlRoleProvider" type="System.Web.Security.SqlRoleProvider" applicationName="/MSP" />

    <authentication mode="Forms">
    <forms name="MyCookieName"
    cookieless="AutoDetect" />

    We need your help! What is to be done?

Share This Page