HTTP could not register URL http://+:8000/testservice/. Your process does not have access rights to

來源:互聯網
上載者:User

今天繼續調試WCF Web API原始碼,方向是跟蹤其單元測試,結果一上手就出了一個錯誤:

HTTP could not register URL http://+:8000/testservice/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).

經過一番好找,才知道是由於在Vista和Win7中的安全設定引起的,使用"netsh.exe"命令可以將http://+:8000/testservice添加到安全設定中,方法如下:

netsh http add urlacl url=http://+:8000/ user=DOMAIN\UserName

但看到這裡,我是不想使用Dos命令,感覺和配路由器一樣,太複雜了,正在這時,一個工具映入眼帘:HttpNamespaceManager

使用這個工具,就可以很快將HttpNamespace添加到安全配置中了,將http://+:8000/testservice添加後,異常果然消除了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.