在服务器中托管并从客户端计算机下载文件时出现Web服务问题 [英] Web service issue while hosting in Server and downloading file from client machine

查看:91
本文介绍了在服务器中托管并从客户端计算机下载文件时出现Web服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个Web服务,并且在本地系统中托管时它可以正常工作
但是,当我在IIS服务器中托管相同的应用程序时,它的工作很奇怪.
有将文件从客户端计算机下载到服务器的功能,但是以下代码返回计算机主动拒绝系统127.0.0.1 ...."异常


I have created a web service and it is working correctly when hosted in Local system
But when I hosted the same application in an IIS server, its working weird.
There is a functionality to download file from client machine to server, but the below code returning the "machine actively refused the system 127.0.0.1...." exception


Dim webReq As System.Net.WebRequest = System.Net.WebRequest.Create(Url)
Dim response As HttpWebResponse = DirectCast(webReq.GetResponse(), HttpWebResponse)
response.Close()

推荐答案

如果它在本地计算机上有效,但不能在远程计算机上有效,则您的代码中有一个问题,当服务器和客户端在其上运行时,该问题将被掩盖同一台机器.没有代码,很难知道细节.您的Web服务不会尝试访问文件系统,是吗?
If it works on the local machine, but not remotely, then you have an issue in your code that is masked when the server and client run on the same machine. Hard to know the details, without code. Your web service does not attempt to access the file system, does it ?


这可能是由于以下原因:

1.配置文件中的Web参考URL.
2.端口(我认为端口已被阻止).我认为您应该尝试在已部署的IP和端口上 Ping telnet .
This might be because of:

1. Web Reference URL in config file.
2. Port (I think the port is blocked). I think you should try to PING and telnet on the deployed IP and port.


这篇关于在服务器中托管并从客户端计算机下载文件时出现Web服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆