使用WCF将文件上传到远程服务器

发布于 2024-12-10 15:58:23 字数 647 浏览 1 评论 0原文

我是 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 技术交流群。

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

发布评论

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

评论(1

旧街凉风 2024-12-17 15:58:23

在某些情况下,您需要在服务器上启用 tcp。 这篇文章可能会有所帮助

In some circumstances you need to enable tcp on the server. this post might help

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