Wanted: Help setting session timeout

Discussion in 'ASP .Net' started by Siegfried Heintze, Aug 16, 2006.

  1. I have edited my web.config file in an attempt to prolong the amount of time
    my browser can site idle:

    <sessionState mode="InProc"
    stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
    source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="2000"
    />

    This does not seem to help, however. I still get the following stack trace
    when the web browser sits for more than 10 minutes (approx) with no
    activity:

    Line 238: void UpdateDataView(){
    Line 239: DataSet ds = (DataSet)
    Session["MyDataSet"];
    Line 240: DataView dv =
    ds.Tables["MyList"].DefaultView;It looks like a session problem to me. Why
    does not chaning the timeout in the web.config file solve this problem?

    Thanks,
    Siegfried
     
    Siegfried Heintze, Aug 16, 2006
    #1
    1. Advertising

  2. Are you sure that Session["MyDataSet"] is not null? I don't see any code to
    check for that. It may very well be that you *think* it isn't null, but a
    logic error or exception in code somewhere else could be making it so.
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Siegfried Heintze" wrote:

    > I have edited my web.config file in an attempt to prolong the amount of time
    > my browser can site idle:
    >
    > <sessionState mode="InProc"
    > stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
    > source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="2000"
    > />
    >
    > This does not seem to help, however. I still get the following stack trace
    > when the web browser sits for more than 10 minutes (approx) with no
    > activity:
    >
    > Line 238: void UpdateDataView(){
    > Line 239: DataSet ds = (DataSet)
    > Session["MyDataSet"];
    > Line 240: DataView dv =
    > ds.Tables["MyList"].DefaultView;It looks like a session problem to me. Why
    > does not chaning the timeout in the web.config file solve this problem?
    >
    > Thanks,
    > Siegfried
    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Aug 16, 2006
    #2
    1. Advertising

  3. Peter,
    Well, I have not checked it with the debugger but I am sure it is null. But
    it only becomes null after 10 minutes or so. It is probably becomming null
    because of some timeout parameter that us purging my session state. Where is
    this parameter? Is it in the web.config file? I tried altering that one and
    it did not help. Is there another one?

    Thanks,
    Siegfried

    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    > Are you sure that Session["MyDataSet"] is not null? I don't see any code
    > to
    > check for that. It may very well be that you *think* it isn't null, but a
    > logic error or exception in code somewhere else could be making it so.
    > Peter
    >
    > --
    > Co-founder, Eggheadcafe.com developer portal:
    > http://www.eggheadcafe.com
    > UnBlog:
    > http://petesbloggerama.blogspot.com
    >
    >
    >
    >
    > "Siegfried Heintze" wrote:
    >
    >> I have edited my web.config file in an attempt to prolong the amount of
    >> time
    >> my browser can site idle:
    >>
    >> <sessionState mode="InProc"
    >> stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
    >> source=127.0.0.1;Trusted_Connection=yes" cookieless="false"
    >> timeout="2000"
    >> />
    >>
    >> This does not seem to help, however. I still get the following stack
    >> trace
    >> when the web browser sits for more than 10 minutes (approx) with no
    >> activity:
    >>
    >> Line 238: void UpdateDataView(){
    >> Line 239: DataSet ds = (DataSet)
    >> Session["MyDataSet"];
    >> Line 240: DataView dv =
    >> ds.Tables["MyList"].DefaultView;It looks like a session problem to me.
    >> Why
    >> does not chaning the timeout in the web.config file solve this problem?
    >>
    >> Thanks,
    >> Siegfried
    >>
    >>
    >>
     
    Siegfried Heintze, Aug 16, 2006
    #3
    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. Do
    Replies:
    2
    Views:
    6,403
  2. Harvey
    Replies:
    0
    Views:
    750
    Harvey
    Jul 16, 2004
  3. Harvey
    Replies:
    1
    Views:
    880
    Daniel
    Jul 16, 2004
  4. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,346
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,308
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page