BeFruit

Thursday, April 17, 2008

WCF on Vista raises an AddressAccessDeniedException

I was trying the example from the excellent book by Michele Leroux Bustamante about WCF, and cound not start them getting the exception AddressAccessDeniedException on ServiceHost.Open().
The solution is to start a console as an administrator (right click on the cmd.exe icon and select "Run as administrator") and execute:
netsh http add urlacl url=http://+:8080/ user=username
  • The + is a wildcard for any domain
  • 8080 is the port I used for my WCF services, use your own
  • username is the user you logged in with, and can be preceded by DOMAIN\username
The problem happens only on Vista (and probably on Windows Server 2008) and not on former systems.

Labels:

0 Comments:

Post a Comment



<$I18N$LinksToThisPost>:

Create a Link

<< Home