无法建立连接,因为目标计算机在iis 7中主动拒绝它xxx.xx.xx.xx:443 [英] No connection could be made because the target machine actively refused it xxx.xx.xx.xx:443 in iis 7
问题描述
你好Fellas,
i有一个web服务asmx连接到443端口的第三方,它在我当地工作正常(调试)感谢我添加的这段代码:
Hi Fellas,
i have a web service asmx that connects to third party in port 443 and it works fine in my local (debugging) thanks for this piece of code that i've added:
objRequest.Proxy = System.Net.HttpWebRequest.GetSystemWebProxy();
但是当我在iis 7中托管我的本地电脑时出现错误:
无法连接,因为目标机器主动拒绝它xxx.xx.xx.xx:443
这是我的代码:
but when i hosted in iis 7 also in my local pc the error occurs:
"No connection could be made because the target machine actively refused it xxx.xx.xx.xx:443"
here's my code:
Uri uri = new Uri(url, UriKind.Absolute);
WebResponse objResponse;
WebRequest objRequest;
objRequest = System.Net.HttpWebRequest.Create(url);
objRequest.Proxy = System.Net.HttpWebRequest.GetSystemWebProxy();
objRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;
objResponse = objRequest.GetResponse();
这是什么想法?我已经花了将近2周的时间才找到答案:(
感谢你的帮助!!!
谢谢!!!
any idead on this? i've been spending almost 2 weeks already just to find answer on this :(
appreciate your help here!!!
Thanks !!!
推荐答案
您的代码没有问题防火墙说不!!!!!!!
去检查你的防火墙设置并检查你是否通过它: - )
Nothing wrong with your code FIREWALL SAYS NO !!!!!!
Go check your firewall settings and check you have allowed it thru :-)
你好,
我认为它与港口有关的问题。
分辨率:
1.尝试托管服务在不同的端口
2.从IIS浏览
3.检查事件查看器是否有错误详情。
谢谢
Suvabrata
Hi,
I think its a port related problem.
Resolution :
1. Try to host the service in different port
2. Browse from IIS
3. Check Event viewer for error details.
Thanks
Suvabrata
这篇关于无法建立连接,因为目标计算机在iis 7中主动拒绝它xxx.xx.xx.xx:443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!