« Previous Next »

Thread: Nested virtual directories?

Last post 10-23-2009 12:48 PM by ali_amr80. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 11-30-2007, 11:31 AM

    • lax4u
    • Not Ranked
    • Joined on 05-28-2004, 2:45 PM
    • Posts 5

    Nested virtual directories?

    i have three .net 2.0 applications.  Mainproject, SubProject1 and SubProject2. All three projects physically located on C: drive as C:/MainProject, C:/SubProject1 , C:/SubProject2. Then in IIS i have setup nested virtual directories. MainProject is the main Vdir. Underneth it there are two more Vdir, SubProject1 & SubProject2. Now my question. is it possible to share session between all of these directories? if yes how? If i create session variable in MainProject is it possible to access it in SubProject1 or SubProject2? Becuase i tried it and im not able to see any session variables that were set in MainProject. Each Vdir has its own web.config

    secondly is it advisable to setup nested virtual directory

  • 11-30-2007, 4:49 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,214
    • IIS MVPs

    Re: Nested virtual directories?

    You could try removing the application setting for SubProject1 and SubProject2 - although I'm not sure how that would affect the processing of their web.config files.  It's the application setting in IIS that determines the scope for session variables.

  • 12-03-2007, 11:38 AM In reply to

    • lax4u
    • Not Ranked
    • Joined on 05-28-2004, 2:45 PM
    • Posts 5

    Re: Nested virtual directories?

    i have web.config only in main project not in subprojects

  • 12-03-2007, 1:05 PM In reply to

    Re: Nested virtual directories?

    lax4u:

    i have web.config only in main project not in subprojects

    Your first post says you have a web.config in each virtual directory.  Which is it?

    Also, make sure the virtual directories are not set as applications if you don't want separate applications.  For information on sharing session data, check the State Management forum at www.asp.net.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 05-08-2008, 12:43 PM In reply to

    • lax4u
    • Not Ranked
    • Joined on 05-28-2004, 2:45 PM
    • Posts 5

    Re: Nested virtual directories?

    sorry i do have web.config in each directory

  • 05-08-2008, 3:30 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,214
    • IIS MVPs

    Re: Nested virtual directories?

    What's happened over the last 5 months?  : )

    Did you remove the application setting from the 2 sub-directories?

  • 10-23-2009, 12:48 PM In reply to

    • ali_amr80
    • Not Ranked
    • Joined on 10-23-2009, 12:45 PM
    • Posts 1

    Re: Nested virtual directories?

     yes jeff your solution works. for above example i copied subproject1 folder under the mainweb folder and didn't create it a virtual directory of it(in other words didn't mark it as an app), and it's allowing me to access session data of mainweb in the subproject1.

     

    thanks for your help :)

Page 1 of 1 (7 items)
Microsoft Communities