User1899107686 posted
Hi All,
I'm not sure if this is the right forum but it seems like a "Getting Started" question.
I have an ASP.NET web app project in Visual Studio 2015, using IIS Express. The simplified folder structure of the project looks like this:
ProjectName
|
|
+--privateFolder
|
|
+--publicFolder
|
|
+ -- default.htm
Basically, I want the "publicFolder" to be the root of my web application. All resources served by the application are in publicFolder. I have been partially successful at making this happen by editing the applicationhost.config file so that it has this
virtualDirectory entry (note the "\public" at the end):
<virtualDirectory path="/" physicalPath="C:\Users\blahBlah\Desktop\Dev\Sites\Web Sites\ProjectName\public" />
With the above entry in applicationhost.config, the "public" folder is the root of my web application and I am able to browse to a URL like
http://localhost:3487 and it works. Note that I do
not have to put "/public" in the URL because it is mapped to in the virtualDirectory entry shown above. This is my goal, to not have "/public" in the URL but yet to maintain the directory structure I showed above.
Here's the problem though: When I close and then re-start Visual Studio, it re-writes the virtualDirectory entry above, removing the trailing "\public".
Is there a way to tell VS that I want a particular sub-folder in the project to serve as the root?