在使用vs2008的Windows服务中托管的wcf时出错

时间:2011-08-02 09:41:40

标签: wcf windows-services wcf-hosting

我在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。   而且我也看不到这一点 来自浏览器的http://localhost:8000/ServiceModelSamples/service/

1 个答案:

答案 0 :(得分:0)

嘿朋友这个问题解决了,因为我从服务(services.msc)启动了服务'WCFWindowsServiceSample'