« Previous Next »

Thread: Problem with setting up virtual directories

Last post 09-01-2009 12:28 PM by anilr. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 09-01-2009, 4:22 AM

    Problem with setting up virtual directories

     Hi,

     We've been running our CMS system on IIS6 and are now planning to move to IIS7, however there is one problem I have yet to find a solution for.

     

    The way the cms works is dependent on virtual folders. A default installation will be installed with a virtual directory called secure that points to the root of the site. (Both the root and /secure are pointing to the same physical location).

    The cms system also handles sub-sites (www.foo.com/subsite), that also uses virtual directories to point the /subsite virtual folder to the root.

     Problem is that I'm running in to all sorts of problems with the web config, and right now I'm at a loss on how to solve this issue. I can get the defualt website up, but then I cannot access /secure and vice versa.

     (The CMS is our own system and I can modify the code to some extent, but to rewrite the entire site handling is quite a big task)

     Anyone who have experience with this, or has any helpful suggestions is greatly appreciated.

     

    Regards Niklas

  • 09-01-2009, 7:30 AM In reply to

    Re: Problem with setting up virtual directories

    Are you saying that this currently works in IIS6 but you are having problems with the IIS7 config?

    Can you explain in more deatil what you mean by " can get the defualt website up, but then I cannot access /secure and vice versa." and what this has to do with the webconfig?

     

  • 09-01-2009, 9:55 AM In reply to

    Re: Problem with setting up virtual directories

    Yes this currently works in  IIS6.

    By default i mean the "/" website.

    In the default I have placed a virtual folder named "secure" pointing to the same physical location as the default folder is pointing to.

     In IIS7 this causes major problems since it is the same web.config file in both parent and child.

     I can either make it work when i access website/ or website/secure, but not at the same time.

  • 09-01-2009, 12:28 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Problem with setting up virtual directories

    The solution to that is not put stuff in web.config file, but rather in applicationhost.config file using location tags - the UI does not allow you to do this easily, you can either accomplish this using ConfigEditor or using appcmd with a -commit:apphost added to the command - in the long-term, this is probably going to be more headache than you want to deal with.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (4 items)
Microsoft Communities