Visual Studio 2010: debugging a web application at the root of IIS 7 Web

I am trying to set up my mvc project so that I can debug it from IIS7, but I need it to be configured for the root of the web application.

What I've done:

  • Added support for "II6 configuration and metadata support" in IIS7
  • Created a new site in IIS7 on localhost: 5000 (default settings)
  • Set the property "Use local web server" in the project properties: http: // localhost: 5000
  • When I click save, I get the following warning: "The local IIS URL http: // localhost: 5000 / specified for the MVC web project is not configured. To save these settings, you need to configure the virtual directory. Would you like to create a virtual directory now?"
  • When I click yes, I get the message: "Unable to create virtual directory. Http: // localhost: 5000 / "

The above works fine when I set the url to point to the sub / virutal folder, for example. http: // localhost: 5000 / mvc .

Any ideas?

+4
source share
2 answers

The solution when creating your IIS site, the main folder should point to the asp.net project folder.

Too easy if you know the solution :)

+7
source

In my case, I did not add the required host header to the IIS configuration. After that, Visual Studio stopped complaining.

In IIS7 Manager, right-click on the site and select "edit bindings." Make sure that the URL that you enter in VS is specified and you can display it from the command line (you should answer 127.0.0.1). If you cannot download it, add the URL to your c:\windows\system32\drivers\etc\hosts file.

0
source

Source: https://habr.com/ru/post/1342095/


All Articles