Session timeout in IIS and web.config, which overwrites which?

Discussion in 'ASP .Net' started by antonyliu2002@yahoo.com, Apr 23, 2008.

  1. Guest

    By default, IIS is configured to timeout a session in 20 minutes,
    which can be changed through the IIS config window.

    I use InProc sessionState mode. I can also set the session timeout in
    web.config. So here is my question:

    If IIS setting has a session timeout value of 20 minutes, but my
    web.config setting has a session timeout of 30 minutes, will the
    session time out in 20 minutes or in 30 minutes?

    Thank you.
    , Apr 23, 2008
    #1
    1. Advertising

  2. bruce barker Guest

    the IIS session setting is for asp only, not asp.net

    -- bruce (sqlwork.com)


    "" wrote:

    > By default, IIS is configured to timeout a session in 20 minutes,
    > which can be changed through the IIS config window.
    >
    > I use InProc sessionState mode. I can also set the session timeout in
    > web.config. So here is my question:
    >
    > If IIS setting has a session timeout value of 20 minutes, but my
    > web.config setting has a session timeout of 30 minutes, will the
    > session time out in 20 minutes or in 30 minutes?
    >
    > Thank you.
    >
    bruce barker, Apr 23, 2008
    #2
    1. Advertising

  3. Guest

    On Apr 23, 12:02 pm, bruce barker
    <> wrote:
    > the IIS session setting is for asp only, not asp.net
    >
    > -- bruce (sqlwork.com)
    >
    > "" wrote:
    > > By default, IIS is configured to timeout a session in 20 minutes,
    > > which can be changed through the IIS config window.

    >
    > > I use InProc sessionState mode. I can also set the session timeout in
    > > web.config. So here is my question:

    >
    > > If IIS setting has a session timeout value of 20 minutes, but my
    > > web.config setting has a session timeout of 30 minutes, will the
    > > session time out in 20 minutes or in 30 minutes?

    >
    > > Thank you.


    Ha, thank you very much. No wonder, from my series of tests, my
    timeout setting in web.config always outlives the IIS session setting.
    I searched for MSDN documentation about what you said, but could not
    find it.
    , Apr 23, 2008
    #3
  4. Guest

    On Apr 23, 12:02 pm, bruce barker
    <> wrote:
    > the IIS session setting is for asp only, not asp.net
    >
    > -- bruce (sqlwork.com)
    >
    > "" wrote:
    > > By default, IIS is configured to timeout a session in 20 minutes,
    > > which can be changed through the IIS config window.

    >
    > > I use InProc sessionState mode. I can also set the session timeout in
    > > web.config. So here is my question:

    >
    > > If IIS setting has a session timeout value of 20 minutes, but my
    > > web.config setting has a session timeout of 30 minutes, will the
    > > session time out in 20 minutes or in 30 minutes?

    >
    > > Thank you.


    I looked into the asp.net configuration setting console, and notice
    that we can also set the session timeout there. So, if I have session
    timeout value of 20 minutes in this asp.net configuration setting
    console, but in my web.config, I set this value to be 30 minutes.
    Which one will take effect?
    , Apr 23, 2008
    #4
  5. re:
    !> If IIS setting has a session timeout value of 20 minutes, but my
    !> web.config setting has a session timeout of 30 minutes, will the
    !> session time out in 20 minutes or in 30 minutes?

    30 minutes.

    ASP.NET configuration settings override IIS configuration settings.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    > By default, IIS is configured to timeout a session in 20 minutes,
    > which can be changed through the IIS config window.
    >
    > I use InProc sessionState mode. I can also set the session timeout in
    > web.config. So here is my question:
    >
    > If IIS setting has a session timeout value of 20 minutes, but my
    > web.config setting has a session timeout of 30 minutes, will the
    > session time out in 20 minutes or in 30 minutes?
    >
    > Thank you.
    Juan T. Llibre, Apr 23, 2008
    #5
  6. re:
    !> I looked into the asp.net configuration setting console, and notice
    !> that we can also set the session timeout there. So, if I have session
    !> timeout value of 20 minutes in this asp.net configuration setting
    !> console, but in my web.config, I set this value to be 30 minutes.
    !> Which one will take effect?

    The ASP.NET configuration tool will update your web.config to whatever value you set.



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    > On Apr 23, 12:02 pm, bruce barker
    > <> wrote:
    >> the IIS session setting is for asp only, not asp.net
    >>
    >> -- bruce (sqlwork.com)
    >>
    >> "" wrote:
    >> > By default, IIS is configured to timeout a session in 20 minutes,
    >> > which can be changed through the IIS config window.

    >>
    >> > I use InProc sessionState mode. I can also set the session timeout in
    >> > web.config. So here is my question:

    >>
    >> > If IIS setting has a session timeout value of 20 minutes, but my
    >> > web.config setting has a session timeout of 30 minutes, will the
    >> > session time out in 20 minutes or in 30 minutes?

    >>
    >> > Thank you.

    >
    > I looked into the asp.net configuration setting console, and notice
    > that we can also set the session timeout there. So, if I have session
    > timeout value of 20 minutes in this asp.net configuration setting
    > console, but in my web.config, I set this value to be 30 minutes.
    > Which one will take effect?
    Juan T. Llibre, Apr 23, 2008
    #6
  7. Guest

    On Apr 23, 2:14 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> I looked into the asp.net configuration setting console, and notice
    > !> that we can also set the session timeout there. So, if I have session
    > !> timeout value of 20 minutes in this asp.net configuration setting
    > !> console, but in my web.config, I set this value to be 30 minutes.
    > !> Which one will take effect?
    >
    > The ASP.NET configuration tool will update your web.config to whatever value you set.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================


    Muchas gracious, senor. But I am confused by two responses of
    yours. :)

    Your first response says:

    ASP.NET configuration settings override IIS configuration settings.

    You meant web.config setting will override whatever setting we make
    through IIS config console, right?

    And here is your second response, shown below:

    The ASP.NET configuration tool will update your web.config to whatever
    value you set.

    Do you mean that my web.config's session timeout value will be changed
    by the IIS config tool to whatever value we set through the IIS config
    tool?

    Please clarify.
    , Apr 23, 2008
    #7
  8. re:
    !> You meant web.config setting will override whatever setting we make
    !> through IIS config console, right?

    Not all settings, but settings which only apply to ASP.NET.

    Other IIS settings ( like for PHP apps or HTML pages ),
    retain the IIS default configuration, unless mapped to the ASP.NET ISAPI dll.

    re:
    !> Do you mean that my web.config's session timeout value will be changed
    !> by the IIS config tool to whatever value we set through the IIS config tool?

    No. I said just the opposite.

    For ASP.NET apps, settings which apply only to ASP.NET
    will override IIS default configuration settings.





    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    On Apr 23, 2:14 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> I looked into the asp.net configuration setting console, and notice
    > !> that we can also set the session timeout there. So, if I have session
    > !> timeout value of 20 minutes in this asp.net configuration setting
    > !> console, but in my web.config, I set this value to be 30 minutes.
    > !> Which one will take effect?
    >
    > The ASP.NET configuration tool will update your web.config to whatever value you set.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================


    Muchas gracious, senor. But I am confused by two responses of
    yours. :)

    Your first response says:

    ASP.NET configuration settings override IIS configuration settings.

    You meant web.config setting will override whatever setting we make
    through IIS config console, right?

    And here is your second response, shown below:

    The ASP.NET configuration tool will update your web.config to whatever
    value you set.

    Do you mean that my web.config's session timeout value will be changed
    by the IIS config tool to whatever value we set through the IIS config
    tool?

    Please clarify.
    Juan T. Llibre, Apr 23, 2008
    #8
  9. Guest

    On Apr 23, 4:55 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> You meant web.config setting will override whatever setting we make
    > !> through IIS config console, right?
    >
    > Not all settings, but settings which only apply to ASP.NET.
    >
    > Other IIS settings ( like for PHP apps or HTML pages ),
    > retain the IIS default configuration, unless mapped to the ASP.NET ISAPI dll.
    >
    > re:
    > !> Do you mean that my web.config's session timeout value will be changed
    > !> by the IIS config tool to whatever value we set through the IIS config tool?
    >
    > No. I said just the opposite.
    >
    > For ASP.NET apps, settings which apply only to ASP.NET
    > will override IIS default configuration settings.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================


    OK, good know. So, with regard to session timeout, web.config will
    override the session timeout setting of the IIS config tool, right?
    , Apr 23, 2008
    #9
  10. re:
    !>OK, good know. So, with regard to session timeout, web.config will
    !>override the session timeout setting of the IIS config tool, right?

    Only for ASP.NET apps... :)




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    On Apr 23, 4:55 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> You meant web.config setting will override whatever setting we make
    > !> through IIS config console, right?
    >
    > Not all settings, but settings which only apply to ASP.NET.
    >
    > Other IIS settings ( like for PHP apps or HTML pages ),
    > retain the IIS default configuration, unless mapped to the ASP.NET ISAPI dll.
    >
    > re:
    > !> Do you mean that my web.config's session timeout value will be changed
    > !> by the IIS config tool to whatever value we set through the IIS config tool?
    >
    > No. I said just the opposite.
    >
    > For ASP.NET apps, settings which apply only to ASP.NET
    > will override IIS default configuration settings.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================


    OK, good know. So, with regard to session timeout, web.config will
    override the session timeout setting of the IIS config tool, right?
    Juan T. Llibre, Apr 23, 2008
    #10
    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,337
  2. =?Utf-8?B?bWc=?=

    RE: session timeout in Web.config & IIS

    =?Utf-8?B?bWc=?=, Jul 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    499
    =?Utf-8?B?bWc=?=
    Jul 4, 2004
  3. CSharpner
    Replies:
    0
    Views:
    990
    CSharpner
    Apr 9, 2007
  4. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,245
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  5. japss
    Replies:
    0
    Views:
    282
    japss
    Apr 29, 2009
Loading...

Share This Page