使用WCF将文件上传到远程服务器
我是 WCF 新手,我正在尝试使用 Windows 服务和 WCF 将文件上传到远程服务器。当我运行我的代码时,出现以下错误。
mscorlib.dll 中发生“System.ServiceModel.EndpointNotFoundException”类型的未处理异常 其他信息:无法连接到 net.tcp://74.208.195.53:5000/。连接尝试持续的时间跨度为 00:00:21.0122019。 TCP错误代码10060:连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立的连接失败,因为连接的主机无法响应74.208.195.53:5000。
我尝试使用示例项目此链接中提供 http://www.codeproject.com/KB/WCF/WCFDownloadUploadService.aspx
我在其他博客中读到,必须允许该端口通过服务器上的防火墙。我这样做了甚至尝试关闭服务器上的防火墙,但它没有帮助。
有人可以指导我如何解决这个问题吗?任何帮助将不胜感激。我使用的是win7,远程服务器是windows server 2008。
谢谢
I am new to WCF, I am trying to upload files to remote server using a windows service and WCF. When i run my code i get the below error.
An unhandled exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in mscorlib.dll
Additional information: Could not connect to net.tcp://74.208.195.53:5000/. The connection attempt lasted for a time span of 00:00:21.0122019. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.208.195.53:5000.
I tried using the sample project provided in this link http://www.codeproject.com/KB/WCF/WCFDownloadUploadService.aspx
I read in other blogs that, the port has to be allowed throught the firewall on the server.i did that even tried turning off the firewall on the server but it dint help.
Can someone please guide me how i could get this issue resolved.Any help would be highly appreciated. I am using win7 and the remote server is windows server 2008.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在某些情况下,您需要在服务器上启用 tcp。 这篇文章可能会有所帮助
In some circumstances you need to enable tcp on the server. this post might help