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

发布于 2024-11-27 20:25:36 字数 1317 浏览 3 评论 0原文

我已在 http://msdn.microsoft.com/en-us 中托管了 WCF /library/ms733069.aspx

在客户端应用程序中,当我添加服务引用 '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.

我也像这样保留了 url C:\Windows\system32>netsh http add urlacl url= http://Service:8000/ServiceModelSamples/service/ user=mydomain\myuser。 我也看不到这个 http://localhost:8000/ServiceModelSamples/service/ 来自浏览器。

I have hosted wcf as in http://msdn.microsoft.com/en-us/library/ms733069.aspx.

In client application when I add service reference 'http://localhost:8000/ServiceModelSamples/service' , I am getting the following error:

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.

I have reserved the url too like this C:\Windows\system32>netsh http add urlacl url=http://Service:8000/ServiceModelSamples/service/ user=mydomain\myuser.
and also i am unable to see this
http://localhost:8000/ServiceModelSamples/service/ from browser.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明月夜 2024-12-04 20:25:36

嘿朋友,当我从服务(services.msc)启动服务“WCFWindowsServiceSample”时,这个问题就解决了

Hey friends this problem is solved as i started the service 'WCFWindowsServiceSample' from services(services.msc)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文