使用 vs2008 的 Windows 服务中托管的 WCF 时出错
我已在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嘿朋友,当我从服务(services.msc)启动服务“WCFWindowsServiceSample”时,这个问题就解决了
Hey friends this problem is solved as i started the service 'WCFWindowsServiceSample' from services(services.msc)