0
我有一個Azure的網站,並在網站下創建的虛擬應用程序:ASP.NET核心的Visual Studio 2015年虛擬應用程序調試
xxx.yyy.com/test
我部署我的ASP.NET應用程序進入這個目錄。
但我怎樣才能在Visual Studio中進行調試時具有相同的設置。當我點擊F5時,我想讓應用程序「部署」並運行在localhost:5000/test中,而不是localhost:5000。
我有一個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>