Session variables lost

Discussion in 'ASP .Net' started by =?Utf-8?B?RXJpaw==?=, Mar 22, 2006.

  1. I have an application that uses sessions variables a lot but one I publish
    the application on the prod server these variables are lost. The application
    is written i c# 2.0 and I've set the statServer timeout to 20 min in the the
    web.config file. Any ideas why the variables are lost?
     
    =?Utf-8?B?RXJpaw==?=, Mar 22, 2006
    #1
    1. Advertising

  2. Are you using InProc for maintaining state ?

    If you're using InProc, your session variables will be lost
    any time your ASP.NET process recycles.

    If you *are* using InProc, you might want to look into using
    State Server of SQL Server for maintaining state.



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "Erik" <> wrote in message
    news:...
    >I have an application that uses sessions variables a lot but one I publish
    > the application on the prod server these variables are lost. The application
    > is written i c# 2.0 and I've set the statServer timeout to 20 min in the the
    > web.config file. Any ideas why the variables are lost?
     
    Juan T. Llibre, Mar 22, 2006
    #2
    1. Advertising

  3. Hi!
    Yes I did use Inproc but now I'm using StateServer instead and it works
    fine. I still don't know why the process recyles so often, I lost the
    variables every 10 seconds.
    /Erik

    "Juan T. Llibre" wrote:

    > Are you using InProc for maintaining state ?
    >
    > If you're using InProc, your session variables will be lost
    > any time your ASP.NET process recycles.
    >
    > If you *are* using InProc, you might want to look into using
    > State Server of SQL Server for maintaining state.
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > aspnetfaq.com : http://www.aspnetfaq.com/
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "Erik" <> wrote in message
    > news:...
    > >I have an application that uses sessions variables a lot but one I publish
    > > the application on the prod server these variables are lost. The application
    > > is written i c# 2.0 and I've set the statServer timeout to 20 min in the the
    > > web.config file. Any ideas why the variables are lost?

    >
    >
    >
     
    =?Utf-8?B?RXJpaw==?=, Mar 22, 2006
    #3
  4. re:
    > I'm using StateServer instead and it works fine.


    Good !

    re:
    > I lost the variables every 10 seconds.


    That points to a serious coding problem, if the ASP.NET
    process is being recycled every 10 seconds.

    Check the event viewer to see the reason for the quick recycling.

    Also, check the Application Pool's recycle settings.

    You may have very short number of requests,
    time or max memory consumption settings.





    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "Erik" <> wrote in message
    news:...
    > Hi!
    > Yes I did use Inproc but now I'm using StateServer instead and it works
    > fine. I still don't know why the process recyles so often, I lost the
    > variables every 10 seconds.
    > /Erik
    >
    > "Juan T. Llibre" wrote:
    >
    >> Are you using InProc for maintaining state ?
    >>
    >> If you're using InProc, your session variables will be lost
    >> any time your ASP.NET process recycles.
    >>
    >> If you *are* using InProc, you might want to look into using
    >> State Server of SQL Server for maintaining state.
    >>
    >>
    >>
    >> Juan T. Llibre, asp.net MVP
    >> aspnetfaq.com : http://www.aspnetfaq.com/
    >> asp.net faq : http://asp.net.do/faq/
    >> foros de asp.net, en español : http://asp.net.do/foros/
    >> ===================================
    >> "Erik" <> wrote in message
    >> news:...
    >> >I have an application that uses sessions variables a lot but one I publish
    >> > the application on the prod server these variables are lost. The application
    >> > is written i c# 2.0 and I've set the statServer timeout to 20 min in the the
    >> > web.config file. Any ideas why the variables are lost?

    >>
    >>
    >>
     
    Juan T. Llibre, Mar 22, 2006
    #4
  5. Hi guys,
    I have also problem with losing my session variables but in the following
    scenario.

    I'm developing a web site on IIS5.1 hosted on WinXP using ASP.NET 1.1 with
    C# and everything is very cool.
    When I deploy to test environment I can remark that my session variables are
    lost after web application make call to a com component. Immediately after
    this, I'm losing session variables.
    Test environment is on Win2003 and IIS6.

    Should I change way of storing my session variables and use Cache object
    insted of Session or what!?

    Best regards,
    Vasko

    "Juan T. Llibre" <> wrote in message
    news:%...
    > re:
    >> I'm using StateServer instead and it works fine.

    >
    > Good !
    >
    > re:
    >> I lost the variables every 10 seconds.

    >
    > That points to a serious coding problem, if the ASP.NET
    > process is being recycled every 10 seconds.
    >
    > Check the event viewer to see the reason for the quick recycling.
    >
    > Also, check the Application Pool's recycle settings.
    >
    > You may have very short number of requests,
    > time or max memory consumption settings.
    >
    >
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > aspnetfaq.com : http://www.aspnetfaq.com/
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "Erik" <> wrote in message
    > news:...
    >> Hi!
    >> Yes I did use Inproc but now I'm using StateServer instead and it works
    >> fine. I still don't know why the process recyles so often, I lost the
    >> variables every 10 seconds.
    >> /Erik
    >>
    >> "Juan T. Llibre" wrote:
    >>
    >>> Are you using InProc for maintaining state ?
    >>>
    >>> If you're using InProc, your session variables will be lost
    >>> any time your ASP.NET process recycles.
    >>>
    >>> If you *are* using InProc, you might want to look into using
    >>> State Server of SQL Server for maintaining state.
    >>>
    >>>
    >>>
    >>> Juan T. Llibre, asp.net MVP
    >>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>> asp.net faq : http://asp.net.do/faq/
    >>> foros de asp.net, en español : http://asp.net.do/foros/
    >>> ===================================
    >>> "Erik" <> wrote in message
    >>> news:...
    >>> >I have an application that uses sessions variables a lot but one I
    >>> >publish
    >>> > the application on the prod server these variables are lost. The
    >>> > application
    >>> > is written i c# 2.0 and I've set the statServer timeout to 20 min in
    >>> > the the
    >>> > web.config file. Any ideas why the variables are lost?
    >>>
    >>>
    >>>

    >
    >
     
    Vasil Buraliev, Mar 23, 2006
    #5
  6. =?Utf-8?B?RXJpaw==?=

    Alex D. Guest

    may be your call to the com component is making you web app to crash or
    maybe the iis is the one whos crashing and restarting.

    "Vasil Buraliev" <> wrote in message
    news:...
    > Hi guys,
    > I have also problem with losing my session variables but in the following
    > scenario.
    >
    > I'm developing a web site on IIS5.1 hosted on WinXP using ASP.NET 1.1 with
    > C# and everything is very cool.
    > When I deploy to test environment I can remark that my session variables
    > are lost after web application make call to a com component. Immediately
    > after this, I'm losing session variables.
    > Test environment is on Win2003 and IIS6.
    >
    > Should I change way of storing my session variables and use Cache object
    > insted of Session or what!?
    >
    > Best regards,
    > Vasko
    >
    > "Juan T. Llibre" <> wrote in message
    > news:%...
    >> re:
    >>> I'm using StateServer instead and it works fine.

    >>
    >> Good !
    >>
    >> re:
    >>> I lost the variables every 10 seconds.

    >>
    >> That points to a serious coding problem, if the ASP.NET
    >> process is being recycled every 10 seconds.
    >>
    >> Check the event viewer to see the reason for the quick recycling.
    >>
    >> Also, check the Application Pool's recycle settings.
    >>
    >> You may have very short number of requests,
    >> time or max memory consumption settings.
    >>
    >>
    >>
    >>
    >>
    >> Juan T. Llibre, asp.net MVP
    >> aspnetfaq.com : http://www.aspnetfaq.com/
    >> asp.net faq : http://asp.net.do/faq/
    >> foros de asp.net, en español : http://asp.net.do/foros/
    >> ===================================
    >> "Erik" <> wrote in message
    >> news:...
    >>> Hi!
    >>> Yes I did use Inproc but now I'm using StateServer instead and it works
    >>> fine. I still don't know why the process recyles so often, I lost the
    >>> variables every 10 seconds.
    >>> /Erik
    >>>
    >>> "Juan T. Llibre" wrote:
    >>>
    >>>> Are you using InProc for maintaining state ?
    >>>>
    >>>> If you're using InProc, your session variables will be lost
    >>>> any time your ASP.NET process recycles.
    >>>>
    >>>> If you *are* using InProc, you might want to look into using
    >>>> State Server of SQL Server for maintaining state.
    >>>>
    >>>>
    >>>>
    >>>> Juan T. Llibre, asp.net MVP
    >>>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>>> asp.net faq : http://asp.net.do/faq/
    >>>> foros de asp.net, en español : http://asp.net.do/foros/
    >>>> ===================================
    >>>> "Erik" <> wrote in message
    >>>> news:...
    >>>> >I have an application that uses sessions variables a lot but one I
    >>>> >publish
    >>>> > the application on the prod server these variables are lost. The
    >>>> > application
    >>>> > is written i c# 2.0 and I've set the statServer timeout to 20 min in
    >>>> > the the
    >>>> > web.config file. Any ideas why the variables are lost?
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >
     
    Alex D., Mar 23, 2006
    #6
  7. Maybe,
    I have log files that COM creates itself and I'm loging errors, warrning and
    infos in web application. Can not see any error. But as u said something is
    crasshin aspnet_wp.exe and my session variables are lost.
    I changed way of storing session data from InProc to ServerProc and now I'm
    not losing session data but... still have some other problems. I will try to
    describe in more details just let me test it litle bit.

    Thanx for answer.
    Regards,
    Vasko.

    "Alex D." <> wrote in message
    news:...
    > may be your call to the com component is making you web app to crash or
    > maybe the iis is the one whos crashing and restarting.
    >
    > "Vasil Buraliev" <> wrote in message
    > news:...
    >> Hi guys,
    >> I have also problem with losing my session variables but in the following
    >> scenario.
    >>
    >> I'm developing a web site on IIS5.1 hosted on WinXP using ASP.NET 1.1
    >> with C# and everything is very cool.
    >> When I deploy to test environment I can remark that my session variables
    >> are lost after web application make call to a com component. Immediately
    >> after this, I'm losing session variables.
    >> Test environment is on Win2003 and IIS6.
    >>
    >> Should I change way of storing my session variables and use Cache object
    >> insted of Session or what!?
    >>
    >> Best regards,
    >> Vasko
    >>
    >> "Juan T. Llibre" <> wrote in message
    >> news:%...
    >>> re:
    >>>> I'm using StateServer instead and it works fine.
    >>>
    >>> Good !
    >>>
    >>> re:
    >>>> I lost the variables every 10 seconds.
    >>>
    >>> That points to a serious coding problem, if the ASP.NET
    >>> process is being recycled every 10 seconds.
    >>>
    >>> Check the event viewer to see the reason for the quick recycling.
    >>>
    >>> Also, check the Application Pool's recycle settings.
    >>>
    >>> You may have very short number of requests,
    >>> time or max memory consumption settings.
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> Juan T. Llibre, asp.net MVP
    >>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>> asp.net faq : http://asp.net.do/faq/
    >>> foros de asp.net, en español : http://asp.net.do/foros/
    >>> ===================================
    >>> "Erik" <> wrote in message
    >>> news:...
    >>>> Hi!
    >>>> Yes I did use Inproc but now I'm using StateServer instead and it works
    >>>> fine. I still don't know why the process recyles so often, I lost the
    >>>> variables every 10 seconds.
    >>>> /Erik
    >>>>
    >>>> "Juan T. Llibre" wrote:
    >>>>
    >>>>> Are you using InProc for maintaining state ?
    >>>>>
    >>>>> If you're using InProc, your session variables will be lost
    >>>>> any time your ASP.NET process recycles.
    >>>>>
    >>>>> If you *are* using InProc, you might want to look into using
    >>>>> State Server of SQL Server for maintaining state.
    >>>>>
    >>>>>
    >>>>>
    >>>>> Juan T. Llibre, asp.net MVP
    >>>>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>>>> asp.net faq : http://asp.net.do/faq/
    >>>>> foros de asp.net, en español : http://asp.net.do/foros/
    >>>>> ===================================
    >>>>> "Erik" <> wrote in message
    >>>>> news:...
    >>>>> >I have an application that uses sessions variables a lot but one I
    >>>>> >publish
    >>>>> > the application on the prod server these variables are lost. The
    >>>>> > application
    >>>>> > is written i c# 2.0 and I've set the statServer timeout to 20 min in
    >>>>> > the the
    >>>>> > web.config file. Any ideas why the variables are lost?
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Vasil Buraliev, Mar 23, 2006
    #7
  8. I found an usfull article. I recomended to all that dealing with COM
    components from ASP.NET.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/DBGch04.asp

    Regards,
    Vasko

    "Alex D." <> wrote in message
    news:...
    > may be your call to the com component is making you web app to crash or
    > maybe the iis is the one whos crashing and restarting.
    >
    > "Vasil Buraliev" <> wrote in message
    > news:...
    >> Hi guys,
    >> I have also problem with losing my session variables but in the following
    >> scenario.
    >>
    >> I'm developing a web site on IIS5.1 hosted on WinXP using ASP.NET 1.1
    >> with C# and everything is very cool.
    >> When I deploy to test environment I can remark that my session variables
    >> are lost after web application make call to a com component. Immediately
    >> after this, I'm losing session variables.
    >> Test environment is on Win2003 and IIS6.
    >>
    >> Should I change way of storing my session variables and use Cache object
    >> insted of Session or what!?
    >>
    >> Best regards,
    >> Vasko
    >>
    >> "Juan T. Llibre" <> wrote in message
    >> news:%...
    >>> re:
    >>>> I'm using StateServer instead and it works fine.
    >>>
    >>> Good !
    >>>
    >>> re:
    >>>> I lost the variables every 10 seconds.
    >>>
    >>> That points to a serious coding problem, if the ASP.NET
    >>> process is being recycled every 10 seconds.
    >>>
    >>> Check the event viewer to see the reason for the quick recycling.
    >>>
    >>> Also, check the Application Pool's recycle settings.
    >>>
    >>> You may have very short number of requests,
    >>> time or max memory consumption settings.
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> Juan T. Llibre, asp.net MVP
    >>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>> asp.net faq : http://asp.net.do/faq/
    >>> foros de asp.net, en español : http://asp.net.do/foros/
    >>> ===================================
    >>> "Erik" <> wrote in message
    >>> news:...
    >>>> Hi!
    >>>> Yes I did use Inproc but now I'm using StateServer instead and it works
    >>>> fine. I still don't know why the process recyles so often, I lost the
    >>>> variables every 10 seconds.
    >>>> /Erik
    >>>>
    >>>> "Juan T. Llibre" wrote:
    >>>>
    >>>>> Are you using InProc for maintaining state ?
    >>>>>
    >>>>> If you're using InProc, your session variables will be lost
    >>>>> any time your ASP.NET process recycles.
    >>>>>
    >>>>> If you *are* using InProc, you might want to look into using
    >>>>> State Server of SQL Server for maintaining state.
    >>>>>
    >>>>>
    >>>>>
    >>>>> Juan T. Llibre, asp.net MVP
    >>>>> aspnetfaq.com : http://www.aspnetfaq.com/
    >>>>> asp.net faq : http://asp.net.do/faq/
    >>>>> foros de asp.net, en español : http://asp.net.do/foros/
    >>>>> ===================================
    >>>>> "Erik" <> wrote in message
    >>>>> news:...
    >>>>> >I have an application that uses sessions variables a lot but one I
    >>>>> >publish
    >>>>> > the application on the prod server these variables are lost. The
    >>>>> > application
    >>>>> > is written i c# 2.0 and I've set the statServer timeout to 20 min in
    >>>>> > the the
    >>>>> > web.config file. Any ideas why the variables are lost?
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Vasil Buraliev, Mar 23, 2006
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gupta
    Replies:
    1
    Views:
    679
  2. Eliyahu Goldin

    Lost session variables - size issue?

    Eliyahu Goldin, Jan 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    374
    Chris Botha
    Jan 14, 2004
  3. =?Utf-8?B?TWljaGFlbCBTTA==?=

    RE: Lost Session Variables

    =?Utf-8?B?TWljaGFlbCBTTA==?=, Feb 25, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    443
    =?Utf-8?B?TWljaGFlbCBTTA==?=
    Feb 26, 2004
  4. P. Prosper
    Replies:
    2
    Views:
    486
    =?Utf-8?B?UGF1bCBI?=
    Aug 26, 2005
  5. Guns

    Session variables are lost

    Guns, Jul 16, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    442
    Alexander Widera
    Jul 16, 2005
Loading...

Share This Page