Click here to Skip to main content
15,903,033 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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:

C#
objRequest.Proxy = System.Net.HttpWebRequest.GetSystemWebProxy();


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:

C#
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();


any idead on this? i've been spending almost 2 weeks already just to find answer on this :(

appreciate your help here!!!

Thanks !!!
Posted
Comments
Sprint89 6-Jun-14 5:22am    
Does a netstat show anything using that port?

Nothing wrong with your code FIREWALL SAYS NO !!!!!!

Go check your firewall settings and check you have allowed it thru :-)
 
Share this answer
 
Comments
ToBecomeDay 6-Jun-14 3:40am    
Hi Leon, i've already turn off my firewall, and already allowed port 443 in inbound rules
leon de boer 6-Jun-14 21:26pm    
All I can say is you have made an error on your firewall rules or the listener thread for port 443 is not open to the outside world.

If you want to check it on the server machine use this link "https://www.grc.com/x/portprobe=443", that is Gibson research port probe server and if it's open it will tell you. It has to report as opened or it isn't going to work. That will at least make sure that side of it is okay.

If it comes back closed or stealthed you need to find the problem on the server listener machine and I am guessing you are going to get one of those two rather than the open state.
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
 
Share this answer
 
Comments
ToBecomeDay 6-Jun-14 3:16am    
HI Suvabrata, still getting the same error, i think the problem is related to 443/ssl?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900