Configure different sessionState on different subdirectory

Discussion in 'ASP .Net' started by =?Utf-8?B?U3Bpcml0RmxhZw==?=, Jun 25, 2007.

  1. I want to configure different sessionState on different subdirectory,so I
    wote this code in wen.config file:
    <location path="SubInProc">
    <system.web>
    <sessionState mode="InProc" cookieless="AutoDetect" timeout="20"/>
    </system.web>
    </location>
    <location path="SubSQLServer">
    <system.web>
    <sessionState mode="SQLServer" cookieless="false" timeout="20"
    sqlConnectionString="data source=MySqlServer; user
    id=ASPState;password=1Gr8State" sqlCommandTimeout="20"/>
    </system.web>
    </location>
    But it does't work.What's wrong with the code and how to configure it? thanks!
     
    =?Utf-8?B?U3Bpcml0RmxhZw==?=, Jun 25, 2007
    #1
    1. Advertising

  2. I would be surprised if you could have different sessions for different
    locations. It contradicts the whole idea of session.

    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "SpiritFlag" <> wrote in message
    news:...
    >I want to configure different sessionState on different subdirectory,so I
    > wote this code in wen.config file:
    > <location path="SubInProc">
    > <system.web>
    > <sessionState mode="InProc" cookieless="AutoDetect" timeout="20"/>
    > </system.web>
    > </location>
    > <location path="SubSQLServer">
    > <system.web>
    > <sessionState mode="SQLServer" cookieless="false" timeout="20"
    > sqlConnectionString="data source=MySqlServer; user
    > id=ASPState;password=1Gr8State" sqlCommandTimeout="20"/>
    > </system.web>
    > </location>
    > But it does't work.What's wrong with the code and how to configure it?
    > thanks!
     
    Eliyahu Goldin, Jun 25, 2007
    #2
    1. Advertising

  3. You can set *one* session state mode per application.




    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/
    ======================================
    "SpiritFlag" <> wrote in message
    news:...
    >I want to configure different sessionState on different subdirectory,so I
    > wote this code in wen.config file:
    > <location path="SubInProc">
    > <system.web>
    > <sessionState mode="InProc" cookieless="AutoDetect" timeout="20"/>
    > </system.web>
    > </location>
    > <location path="SubSQLServer">
    > <system.web>
    > <sessionState mode="SQLServer" cookieless="false" timeout="20"
    > sqlConnectionString="data source=MySqlServer; user
    > id=ASPState;password=1Gr8State" sqlCommandTimeout="20"/>
    > </system.web>
    > </location>
    > But it does't work.What's wrong with the code and how to configure it? thanks!
     
    Juan T. Llibre, Jun 25, 2007
    #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. Dave Mitchell

    Re: subdirectory settings

    Dave Mitchell, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    389
    Dave Mitchell
    Jul 15, 2003
  2. VB Programmer
    Replies:
    0
    Views:
    291
    VB Programmer
    Oct 16, 2003
  3. Scott Natwick

    Creating a Form in a subdirectory

    Scott Natwick, Oct 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    325
    Scott Natwick
    Oct 24, 2004
  4. HS1
    Replies:
    0
    Views:
    470
  5. Manuel Ricca
    Replies:
    0
    Views:
    335
    Manuel Ricca
    Dec 11, 2007
Loading...

Share This Page