asp.net self host and urlacl(解決UnHandledException Message:拒絕訪問的問題)

命令提示符(管理員權限)需要添加的代碼:

netsh http add urlacl url=http://*:9999/ user=Everyone listen=yes

其中:
url:代碼中的url(如asp.net selfhost裏的WebApp.Start<Startup>("http://*:9999")代碼);
user:賦予權限的組;

查看操作系統中已經存在的保留項:
netsh http show urlacl

刪除操作系統中已存在的保留項:
netsh http delete urlacl url=http://*:9999/

相關地址:
https://stackoverflow.com/questions/16642651/self-hosted-owin-and-urlacl

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章