Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing WCF Base address

Tags:

wcf

By default the base address for my test wcf application is

http://localhost:8732/Design_Time_Addresses/evalservice

but when I remove the Design_Time_Addresses and go for a simple base address like below

<add baseAddress="http://localhost:8732/evalservice" />

I receive the below error

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

and when I move it back to Design_Time_Addresses the issue is resolved.

What is Design_Time_Addresses and how can I change it to a more simple base address?

like image 997
Abhi Avatar asked Apr 15 '15 17:04

Abhi


1 Answers

The Design_Time_Addresses namespace is automatically registered by the .NET framework to allow users without administrator privileges to develop WCF services:

You can modify access using the netsh.exe tool [...] under the elevated administrator account. The following is an example of using netsh.exe.

netsh http add urlacl url=http://+:9002/MyService user=<domain>\<user>

Another workaround would be to run Visual Studio as administrator.

like image 137
nodots Avatar answered Sep 29 '22 01:09

nodots