更改WCF基址

更改WCF基址,wcf,Wcf,默认情况下,我的测试wcf应用程序的基址是 http://localhost:8732/Design_Time_Addresses/evalservice 但是,当我删除设计时间地址并选择下面这样的简单基址时 <add baseAddress="http://localhost:8732/evalservice" /> 当我把它移回设计时,问题就解决了 什么是设计时间地址?如何将其更改为更简单的基址?设计时间地址命名空间: 您可以使用提升的管理员帐户下的netsh.exe工具[…

默认情况下,我的测试wcf应用程序的基址是

http://localhost:8732/Design_Time_Addresses/evalservice
但是,当我删除设计时间地址并选择下面这样的简单基址时

<add baseAddress="http://localhost:8732/evalservice" />
当我把它移回设计时,问题就解决了


什么是设计时间地址?如何将其更改为更简单的基址?

设计时间地址命名空间:

您可以使用提升的管理员帐户下的netsh.exe工具[…]修改访问权限。以下是使用netsh.exe的示例

netsh-http-add-urlacl-url=http://+:9002/MyService-user=\

另一个解决方法是以管理员身份运行VisualStudio

Please try changing the HTTP port to 8732 or running as Administrator.
System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8732/evalservice/. 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