tags:

views:

52

answers:

1

For a shared test environment I need to place an ASP.NET MVC 1.0 web application in a subfolder. So the URL to the web applications start page will look something like http://192.168.100.1/webapp1/.

Is this possible at all or must it always reside in the root?

+2  A: 

Er yes- just create a virtual directory. Let us know if you want any further info (I suggest you try Google first though).

RichardOD
The links doesn't work and the site loses its css (yes, I use relative urls to the css files and the anchor helper to create the links). So do you have any suggestions how to fix that?
Gabriel Svennerberg
Use Fiddler to see where the Web browser is requesting. I always use something like this (Url.Content) <script type="text/javascript" src="<%= Url.Content("~/scripts/jquery-1.3.2.js")%>"></script>, cause it always works.
RichardOD
Richard is exactly right. The problem is not that MVC is somehow incompatible with a virtual directory. The problem is that *the views you have written* contain absolute paths, and absolute paths are not compatible with deployment to a virtual directory. You need to fix your views, in exactly the way specified in Richard's comment.
Craig Stuntz