Set the Visual Studio local IIS 7 debug Virtual Path to /
In visual studio 2008 or 2010, the option to debug in a local IIS is available on the Web tab of a web application project. I can choose this type of debugging and put in the URL of a local site (eg. http://localhost:1234/MyAppName) and have the debugger start up and be happy as a clam.
My question is, is there ANY way to have it let me just use http://localhost:1234 instead of using a subdirectory (virtual directory) path that is not /
I would really prefer to use the IIS debugging to be more sure we are developing in an environment closer to what we host on, but the routing rules we have rely on the fact that the pages being requested are from / and not /MyAppName.
If you go to IIS 7 and create a new website (not inside default - IIS7 gives ability to create multiple websites) - set the binding of that website to 1234 and set the root of that website to your app - that way you will be able to use the http://localhost:1234
you can continue to keep the default website running since you are not on the same port. When in Visual Studio - press alt + enter or f4 over the web app - go to the web tab and set the IIS path to the path you just created
hope it helps
paul
链接地址: http://www.djcxy.com/p/61194.html