ASP.NET核心的Visual Studio 2015年虚拟应用程序调试
问题描述:
我有一个Azure的网站,并在网站下创建的虚拟应用程序:ASP.NET核心的Visual Studio 2015年虚拟应用程序调试
xxx.yyy.com/test
我部署我的ASP.NET应用程序进入这个目录。
但我怎样才能在Visual Studio中进行调试时具有相同的设置。当我点击F5时,我想让应用程序“部署”并运行在localhost:5000/test中,而不是localhost:5000。
答
为什么您在发布问题后2秒找到答案?
打开解决方案的applicationhost.config,它隐藏在.vs文件夹中。
找到应用程序标签。复制并添加一个新的应用程序标签并更改从/到/ test的路径。在第一个应用程序标记上,我是否将physicalPath更改为其他内容。
<site name="xxx.yyy" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\" />
</application>
<application path="/test" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\Project\xxx\src\xx.yy" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:5001:localhost" />
</bindings>
</site>