我在http://msdn.microsoft.com/en-us/library/ms733069.aspx中托管了 wcf 。
在客户端应用程序中,当我添加服务引用 'http://localhost:8000/ServiceModelSamples/service' 时,我收到以下错误:
There was an error downloading 'http://localhost:8000/ServiceModelSamples/service'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8000
Metadata contains a reference that cannot be resolved: 'http://localhost:8000/ServiceModelSamples/service'.
Could not connect to http://localhost:8000/ServiceModelSamples/service. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8000.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8000
If the service is defined in the current solution, try building the solution and adding the service reference again.
我也像这样 C:\Windows\system32>netsh http add urlacl url=http://Service:8000/ServiceModelSamples/service/user=mydomain\myuser 保留了 url。而且我也无法 从浏览器中看到这个http://localhost:8000/ServiceModelSamples/service/ 。