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

Background:

I am running a e-commerce website which will call a remote payment gateway when customer check out.

I have tested my web application at my local machine. Everything just works fine. I have no problem to connect my payment gateway

 However, after I have upload all my application code to my hosting company, I cannot check out because my web application cannot connect to the payment gateway

And get following errors:

"

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: 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

Source Error:

Line 154:						OrderNumber = AppLogic.GetNextOrderNumber();
Line 155:						//String status = Gateway.MakeOrder(cart,"Credit Card",String.Empty,CardName,CardType,CardNumber,CardExtraCode,CardExpirationMonth,CardExpirationYear,OrderNumber,String.Empty, String.Empty, String.Empty,String.Empty,String.Empty,String.Empty,String.Empty,String.Empty);
Line 156:						String status = Gateway.MakeOrder(cart,OrderNumber);
Line 157:						if(status != "OK")
Line 158:						{
0 bullman 3/21/2007 7:16:46 AM

Hi,

I'm having the same error only in quality testing environment, but it only happened once in a while. Lately it began to happen very often and consistently.

As far as I can tell, there are no network connectivity problems (the web services used are accessible from the web application machines) and no proxys are used.

The proxy config in web.config didn't help either.

Did you find any solution to this problem?

Thank you,

Paulo Cunha
 

0 paulocunha 5/7/2007 3:57:04 PM

 I too am having this type of issue, and tried the suggested fix (I assumed the change went on the web service server's web.config).

Lets see if someone from Microsoft can explain. 


/Bob C in GRR
0 Bob_Chauvin 6/15/2007 3:56:33 PM

 I'm having the same problem!

 Did you find any solution? I'm tearing my hair out here.

 


 

0 Lois 6/22/2007 2:45:28 PM

 The only solution I found was to install VS on the server.

 Chime in here, perhaps MS will listen if more than one of us complains.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=283035
 


/Bob C in GRR
0 Bob_Chauvin 6/22/2007 6:06:21 PM

Yep me too. I'mhaving the same problem. Am trying to do a simple httpWebRequest. Have tried using both intranet and internt URLs and neither work. Keep getting

 A connection attempt failed because the connected party did not properly respond after a period of time

0 ifflanb 6/25/2007 1:17:51 AM

 Please update this page https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=283035 as it is monitored by MSFT.


/Bob C in GRR
0 Bob_Chauvin 6/25/2007 1:49:52 PM

This sounds like a simple network issue.  Either your local network or the payment provider endpoint is too busy or unavailable.  Perhaps you should write your code in a way that will retry the connection a specified number of times.  It may be true that there is some bug or poor code in the framework that is causing this, but it is more likely that the network is letting you down.  After all, no network is 100% available 100% of the time, so it makes sense to write your code accordingly. 

0 Matt 6/25/2007 2:24:50 PM

 

Matt-dot-net:
This sounds like a simple network issue.

I am not sure...

Matt-dot-net:
Perhaps you should write your code in a way that will retry the connection a specified number of times

Useful to avoid exceptions caused by bottlenecks at server side but not sufficient for the described problem when it occurs permanently.

I think, this is a problem caused by the security configuration of the remote server.

1) Should you try first to configure it with Caspol.exe,

 http://msdn2.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx

2) if 1) does not work, try again with the .NET Framework Configuration Tool (Mscorcfg.msc) (that comes with the .NET Framework SDK (354 MB)  ;-(

Section : Remoting Services/View Remoting Services Properties

Give us please a feed-back with addfulltrust option added to your application server assembly.

David
 

 


 

0 davidimm 10/16/2007 3:45:09 PM

Hello... What if remoting services properties is empty... I see no way to add anything there?problems

EDIT: I'm running IIS7 on windows server 2008 if that means something to you...it's almost vanilla. not much was tweaked.

0 nubie 8/18/2008 4:45:18 PM

I have exactly the same problem, the website is working fine in localhost but not on live. The payment provider endpoint is also available. I have double checked with the gateway provider. It's pulling out my hair and any help will be much appreciated.

I am hosting on a shared server and so I cannot install any tools.
0 ayeayemyo 11/9/2008 8:28:20 PM

I ran into this as well.  My problem was that I needed to send an email from exchange via my web app.  Our exchange server has two IP's (.60 and .62).  I setup the site locally using .60.  When I tried to recover a password using the built-in password recovery tool, while the site was in production, I got the error..  When I changed it to .62, everything worked fine.  Not much of an answer, but that was my issue...

0 buekow 1/23/2009 7:14:25 PM
Reply:

(Thread closed)