我已經使用Visual Studio 2012創建了一個REST風格的Web服務應用程序。我想使用自定義URL而不是http://localhost:Port
或http://localhost/Test
訪問此Web服務。我遵循了下面的URL中提到的步驟,但這對我沒有任何作用。 Using Custom Domains With IIS Express使用Visual Studio 2012的REST風格Web服務的自定義URL
修改WCF應用程序項目轉到屬性 - >網絡,然後設置使用IIS快遞 - >項目爲 「http://localhost/54077
」 和Override Applicationroot網址爲 「http://dev.test.com/enroll
」。點擊 「創建虛擬目錄」
修改了C:\用戶\ <> \文檔\ IISExpress \ CONFIG \對ApplicationHost.config如下:
<bindings>
<binding protocol="http" bindingInformation="*:54077:localhost" />
<binding protocol="http" bindingInformation="*:80:dev.test.com"/>
</bindings>
添加下面的一行到C:\ Windows \ System32下\ DRIVERS \等\主機
127.0.0.1 dev.test.com
localhost dev.test.com
當我運行從Visual Studio 2012的WS服務,我得到錯誤的「無法啓動IIS快遞Web服務器,端口80在使用中」。
有沒有人知道這個問題的答案?
此外,我想知道如何配置使用 使用自定義的URI的Web服務 - 利用IIS快速未經檢查 - 利用IIS快速檢查
感謝推進
80默認端口正在被iis頁使用,請嘗試更改端口 – varun
更改applicationhost.config中的端口,如下所示: <綁定協議=「http」bindingInformation =「*:8080:dev.test.com」/> 這導致錯誤「無法啓動IIS Express Web服務器。指定的起始URL無效「 –
Raj