I'm trying to configure 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 the su开发者_如何学Pythonpport for the "II6 configuration and metadata support" to IIS7
- Created a new site in IIS7 at localhost:5000 (default settings)
- Set the property "Use Local Web Server" in the project properties to : http://localhost:5000
- When I click save I get the following warning: "The local IIS URL http://localhost:5000/ specified for Web project MVC has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?"
- When I click yes I get the message: "Unable to create the virtual directory. http://localhost:5000/"
The above works fine when I set the url to point to a sub/virutal folder e.g. http://localhost:5000/mvc.
Any ideas?
The solution is when creating your IIS Site, the underlying folder needs to point to the asp.net project folder..
Soo easy if you know the solution :)
In my case, I hadn't added the required host header to the IIS config. After doing so, Visual Studio stopped complaining.
In IIS7 manager, right-click on the site, and select "edit bindings." Make sure that the URL you're entering in VS is listed, and that you can ping it from the command line (should respond from 127.0.0.1). If you can't ping it, add the url to your c:\windows\system32\drivers\etc\hosts
file.
精彩评论