当另一位开发人员试图通过vs 2010运行该服务时,他们收到错误:
Please try changing the HTTP port to 88 or running as Administrator.
System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:88/ColorService/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---> System.Net.HttpListenerException: Access is denied
在进行一些搜索并进入Microsoft指定的链接后,我让它们运行以下命令:
netsh http add urlacl url = http:// +:88 / ColorService user = BUILTIN \ Administrators
错误仍然存在,所以我也让他们用他们的Domain \ User
运行命令netsh http add urlacl url = http:// +:88 / ColorService user = DOMAIN \ User
上面仍然没有用,所以我在下面的link找到了一个工具来尝试并提供对NT Authority \ Interactive的访问权限,但这也没有用。
我最终还原为每个端点提供了一个基地址:
http:\\localhost:8732\Design_Time_Addresses\ColorService
之后就可以了。
为什么它不能与其他基地址一起使用?
我在每个端点中也没有任何dns节点,这有关系吗?这是用来做什么的?我把它添加回来:
<Host>
<dns>localhost<dns/>
</Host>
答案 0 :(得分:2)
我有这个错误。我在app.config中配置了端点,如:
<host>
<baseAddresses>
<add baseAddress="http://ttintlonape01:6970/janus/data" />
</baseAddresses>
...但它提出了你所拥有的http://+:80/janus/data。
关闭WCF自动放入端点(不确定何时) - 添加&lt; clear /&gt;到配置修复它。即。
<service behaviorConfiguration="ServiceBehavior" name="TT.Janus.Service.DataProvider">
<clear />
<endpoint address="net.tcp://ttintlonape01/janus/data" binding="netTcpBinding"
bindingConfiguration="NoSecurityBinding" contract="TT.Janus.Service.IDataProvider" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://ttintlonape01:6969/janus/data" />
</baseAddresses>
</host>