How do you set up HTTP ACL's for a WCF 3.0 REST application on Windows 7?

◇◆丶佛笑我妖孽 提交于 2019-12-11 09:51:31

问题


I have been reading O'Reilly's "RESTful .NET" and am working with the example program on pg. 24 - 25. This sets up a custom binding for handling REST requests. When I execute the code, it fails as it does not have permission to set up listening on http://localhost:8889/TestHttp

According to MSDN (http://msdn.microsoft.com/en-us/library/ms733768%28VS.100%29.aspx), I need to configue netsh. I am using the following netsh string:

netsh http add urlacl url=http://localhost:8889/TestHttp user=DOMAIN\user

where DOMAIN\user is customized to my account.

This appears to process in an additional console window, but executing my code causes the same failure. Does anyone know how to fix this ?

Thanks,

Scott


回答1:


If you are on vista or windows 7 you need to run a cmd.exe session or powershell as administrator then run the command.



来源:https://stackoverflow.com/questions/2027450/how-do-you-set-up-http-acls-for-a-wcf-3-0-rest-application-on-windows-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!