2012-05-24 96 views
8

所以我試圖設置一個本地測試域,所以我可以有一個使用此article的子域。我的問題是,我可以在IIS中設置好網站並瀏覽到那裏的文件。但是,當試圖設置視覺工作室使用該網站的例如。在Project Url中:http://localtest.me當我單擊Create VirtualDriectory時,出現以下錯誤:Unable to create virtual directory. The URL 'http://localtest.me' is already mapped to a different folder 'C:\Websites\site'enter image description here使用本地IIS Web服務器進行調試

如果我從IIS中刪除該網站並允許visual studio嘗試創建它,則會出現以下錯誤:Unable to create the virtual directory. Could not find the server 'http://localtest.me' on the local machine. Creating a virtual directory is only supported on the local IIS server。但網站localtest.me poits到127.0.0.1,這是我的本地機器嗎?

那麼如何在像這樣的場景中設置調試,我已經在IIS中創建了該站點?

+0

VS在這裏很愚蠢。我認爲這只是一個錯誤,他們會一直留在VS15之前; p – leppie

+0

您可能可以使用建議的設置,然後手動修改項目文件。 – leppie

+0

@leppie手動修改項目文件是我的最後手段,然後纔看到有人知道如何通過軟件修復它:( –

回答

2

而不是在Visual Studio中使用「使用本地IIS Web服務器」設置,我總是選中「使用自定義Web服務器」並將其指向我的本地URL。爲你的示例localtest.me與上面的啓動url設置爲localtest.me

如果仍遇到問題,您可以始終進入調試模式,但附加到進程而不是F5並選擇IIS進程。

+0

謝謝。這對我有用。 – ivymike

相關問題