开发者

netsh does not work for AddressAccessDeniedException: HTTP could not register URL

When another developer tried to run the service through vs 2010, they received the error:

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 righ开发者_如何学Cts to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---> System.Net.HttpListenerException: Access is denied

After doing some searches and going the the link Microsoft specified, I had them run the following command:

netsh http add urlacl url=http://+:88/ColorService user=BUILTIN\Administrators

The error still came up, so I also had them run the command with their Domain\User

netsh http add urlacl url=http://+:88/ColorService user=DOMAIN\User

The above still didn't work, so I found a tool at the following link to give that a try and give access to NT Authority\Interactive, but that didn't work either.

I finally reverted back to giving each endpoint a base address of:

http:\\localhost:8732\Design_Time_Addresses\ColorService and it worked after this.

Why won't it work with the other base addresses?

I also did not have any dns Nodes within each endpoint, does this matter? What is this used for? I added it back as:

 <Host>
     <dns>localhost<dns/>
 </Host> 


I had this error. I had it configured in the app.config with endpoints like:

<host>
<baseAddresses>
    <add baseAddress="http://ttintlonape01:6970/janus/data" />
</baseAddresses>

...but it was coming up with the http://+:80/janus/data which you got.

Turned out WCF puts in an endpoint automatically (not sure when) - adding <clear /> to the config fixed it. I.e.

<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>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜