0

We have an ASP.NET MVC Intranet hosted on our IIS server. As you'll know, a Visual Studio project/solution called "MyProject" for example, will have the first folder containing the solution, then another one containing the project files, so it would be http://intranet/myproject/myproject/ for example.

Is there a way to change this, so that it's just http://intranet/myproject?

Hope I've explained the issue clearly!

3
  • Yes, set the default Controller, Action name in RouteConfig Commented Jun 12, 2015 at 7:15
  • You're not forced to have a directory for the solution itself (and virtual directory may point to project folder directly) but well...actually you shouldn't make your source directories visible. You have to publish compiled web site (without source code, optimized and only with essential files). I hope IIS virtual directory is not root folder for your project (at least not in production)... Commented Jun 12, 2015 at 7:16
  • @AdrianoRepetti the Virtual Directory was the second folder. So you have the "MySolution" folder where X amount of projects will be, then the virtual directory was "MyProject" Commented Jun 12, 2015 at 7:24

1 Answer 1

1

Visual studio itself provides an option to create the Virtual Directories and mappings into IIS.

Please follow step1 and step2, may be it helps If I have got the question correct.

![STEP 1][1] 1. Right Click Project in Visual Studio 2. select properties

![Step2][2] 1. Select option "Web" in left panel 2. on the central screen, select "LocalIIS" option from the Dropdownlist 3. provide the Virtual Path for you app in the text box as 4. http://localhost/YourAppName 5. click CreatevirtualDirectory

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.