5

Under sites in IIS I have made a new node that binds to port 80 and stopped all the other websites nodes/pools that would otherwise bind to that port.

Under the new node I created an application baz1, so the path the website is on is http://MyServer/baz1/...

I also have other directories/applications under the node I created like baz2, baz3, etc...

My only problem is that the application only runs correctly when it is at the root. So instead of being at http://MyServer/baz1/ it needs to be at http://MyServer/

Is there a way to keep all the applications grouped under my new node and have only one run at a time and be run at the root? I don't want to put the one I'm trying to run under default web site for multiple reasons.

I've googled, bing'd, and experimented on everything I can think of but can't find a way to change the virtual path of an application so I'm hoping someone here knows.

Thanks everyone and if my question isn't clear let me know and I'll clarify it asap

Josh R
  • 1,970
  • 3
  • 27
  • 45
  • Can you expand on the comment "My only problem is that the application only runs correctly when it is at the root". What doesn't run correctly? Also, Just guessing, but make sure you aren't linking to any resources with a starting slash, as that will take you back to your server root. – AaronS Nov 30 '12 at 21:08
  • Sorry about my delay answering. Thanks for the help so far! The application can be thought of as a black box I can't change the code of (for better or worse, sorry!) that doesn't have relative links for pages and other resources that work correctly when not at the root. I think you're saying my best bet is to change the code so the web app works wherever I drop it(that would be ideal), but I'm not able to do that. – Josh R Dec 03 '12 at 22:44
  • 1
    I would load up fiddler and see if anything on the site is trying to look for resources at the root. If it is, then unfortunately I believe you're stuck leaving the site at the root. – AaronS Dec 04 '12 at 16:52
  • Thanks for the advice, fiddler is a nice tool. I only used Firebug and Chrome's dev tools (the network tabs) before it. Based on my findings from Fiddler I do need the application to be at the root. I haven't been able to figure out how to remap a virtual directory to root so I've adopted the (not ideal) workflow of publish to root, with a delete and republish to the same location. No virtual directories involved. – Josh R Dec 07 '12 at 20:05
  • 1
    I do something similar. I have a bunch of folders I deploy to. Then I run a small console app that gives me a list of these folders where I choose which one I want to be active. It then sets the root folder of IIS to this directory. this way you don't have to constantly replace your directory. – AaronS Dec 07 '12 at 20:16

0 Answers0