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

I am running a e-commerce website which will call a remote payment gateway when customer check out. with ASP.NET(2.0)

The Bank Give Me WebService and say to me to use post method for sending my information.

My Transaction State Is Ok But when i call a method of Bank webservice  it give me error  

_______My Sample Code ___________

double TA;
WebServices.ReferencePayment PaymentWebService = new WebServices.ReferencePayment();
string MID = "00229018-45987";
string t_strRefNum="*********";
double t_lAmount;
protected void Page_Load(object sender, EventArgs e)
    {
        t_lAmount = double.Parse(Session["Amount"].ToString());
        t_strRefNum = Request["RefNum"].ToString();
       TA = PaymentWebService.verifyTransaction(t_strRefNum, MID);
/***************************
    }

  

Error  Is :

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SocketException (0x274c): 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]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +1028066
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream() +1532269
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103
   WebServices.ReferencePayment.verifyTransaction(String String_1, String String_2) +63
   ASP.confirmreservations_aspx.Page_Load(Object sender, EventArgs e) +1024
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

0
ehsh
11/9/2007 11:49:33 AM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

7 Replies
2485 Views

Similar Articles

[PageSpeed] 10

Hi Every Body , PLEASE HELP ME ,

I 'm waiting to receiving a answer .

Thank'sssssssssss

0
ehsh
11/11/2007 8:22:33 AM

Hi ehsh ,

From the error message, it is that the bank web service don't response your request, you have to check:

  1. Whether you can visit the bank web service
  2. Whether you have right to visit web service, do you use the certificate or other way provided by bank to verify your right.

If you still can't solve it , I am afraid you have to connect bank service.

Best regards,
Guang-Ming Bian - MSFT


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Guang
11/14/2007 7:21:40 AM

Hi, sorry for reactivating this old thread. but were you able to solve your problem?! How please?

 I'm having the very same issues with an IIS7 on Windows Server 2008 setup that won't go outside to fetch any data what so ever...but everything works fine when testing on Visual Studio's 2008 development server (which is installed on the same machine, btw yes I know it's bad practice to mix the production and server machines)...still this is drivin' me crazy.

Also, my machine is behind a proxy server, which is set in Internet Options (I can surf the web using IE on that machine)?!?

 Any ideas?! Any?! Any1? Plz...I'm loosin' my mind Party!!!

0
nubie
8/18/2008 1:09:20 PM

The problem could be that you need to explicitly set the proxy and credentials to the request

                    this._request.Proxy = new WebProxy(proxyServer, proxyPort);
                    this._request.Proxy.Credentials = new NetworkCredential(username, password);

 As in the dev environment it runs under your credentials, whereas when it's in the prod it will use the default IIS settings

0
auschucky
9/23/2008 4:22:19 AM

 As well as this, try including the inpersonate tag in the web.config

0
auschucky
9/23/2008 4:35:42 AM

Actually my friend what you're saying is true in some way, but it's a bad practice, usually It's works for development purpose, but in production you have to use a service user (account) administrated by

Directory Server, so your reply is not valid..

 

What I suggest is check your configurations with the MOM utility, after that use impersonation and windows authentication.

 

Regards

0
drdre_08
10/9/2008 3:40:26 PM

 thanks, buddy. It fixed my issue. I was trying to access a server in our intranet from DMZ.

0
sbilla
3/5/2009 9:59:00 PM
Reply:

Similar Artilces:

"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 IP:PORT"
 Hi all, "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 IP:Port"  this is the error i am geeting while sending an email using System.Net.Mail My Code here :MailMessage objMail;        SmtpClient objSMTP;        // Now create the email        objMail = new MailMessage();        objMail.To.Add...

VS2005 IDE: Add Web Refernece. 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 fa
 I have published a web service, but cannot connect to it in VS2005.  The Web Methods display, but I then get this error: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 I CAN connect to it outside of VS2005 from IE, Stylus Studio, etc.  /Bob C in GRR Hi  Bob, That might be a problem with proxy. Please try this solution: http://west-wind.com/weblog/posts/3871.aspx. Also you can refer to this article: http://msdn.microsoft...

A connection attempt failed because the connected party did not properly respond after a period of time
 When trying to send an email I'm getting this error. What does it mean? Thanks.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 216.34.131.135:25 Regards, Curt It means that a connection could not be established to the host at 216.34.131.135 on port 25 I have tried to connect to that host, and it is not accepting mail on port 25 The simple way to test this is go to the command prompt and type: telnet 216.34.131.135 25 this will try and ...

Connection Failed Activation of Network Connection Failed
I am running openSUSE 12.1 Beta 1 GNOME and I cannot get an internet connection. The wireless on my laptop says missing firmware which is fine. It says this on any distro and I can get it working. However, I can not get my wired connection to work. It keeps trying to connect and says "Connection Failed Activation of Network Connection Failed. I have seen other people have this problem online somewhere and they said they had to swap something from manual to auto, but I am not sure what or where. I know that this laptops ethernet card will work fine on here b/c I used ope...

System.Exception: System.Web.HttpException: The transport failed to connect to the server. System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
I have an application which creates about 50 XML packages and sends a notification about the success/failure of every package. I am running this code in threads and I have restricted maximum no. of threads that can be active at any time to 2.So the package generation and the notification would be performed for 2 packages in parallal. But while sending notifications to users, I am getting the below error only for very few packages[ 1 or 2 out of 50] . The same base code is used by all the packages but i am getting this error intermittently. System.Exception: Error sending mail to [So...

superreview granted: [Bug 219376] Trying to resolve IP's via DNS (Failed connections stall instead of giving Connection Failure Error; pages stop/don't finish/complete loading if ad hosts/scripts fail
Brian Ryner <bryner@brianryner.com> has granted Darin Fisher <darin@meer.net>'s request for superreview: Bug 219376: Trying to resolve IP's via DNS (Failed connections stall instead of giving Connection Failure Error; pages stop/don't finish/complete loading if ad hosts/scripts fail) http://bugzilla.mozilla.org/show_bug.cgi?id=219376 Attachment 132718: v1.1 patch http://bugzilla.mozilla.org/attachment.cgi?id=132718&action=edit ...

not connected when I am connected
What do I need to change on my 'puter when the icon in the toolbar shows and tells me I am connected and the error message tells me I am not and I can not go to web pages, get or send emails. I have to close down and restart to get connected again. This only happens if I am on line and leave the 'puter for an hour or so. As long as I am using it I don't have a problem. This just started about a month ago. I am on very slow dialup, DSL and Cable not in my area, thanks you SBC/ATT tks Elaine wrote: > What do I need to change on my 'puter when the icon in ...

Failed to Connect Firefox can't establish a connection
Hello, I get "Failed to Connect Firefox can't establish a connection to the server at 127.0.0.1:3580." when I try to open a Help File of one of the applications I have. My /etc/hosts file has its entries right: 127.0.0.1 hostname.hostdomain hostname My firewall is also disabled. nmap -sT -O localhost gives me (I have included some): 2401/tcp open cvspserver 2601/tcp open zebra 5900/tcp open vnc 8009/tcp open ajp13 8085/tcp open unknown Device type: general purpose Running: Linux 2.6.X OS details: Linux 2.6.17 - 2.6.25 I understand that the port ...

database connection failed with connection cache
I have a connection cache on jag 3.6.1 using com.sybase.jdbc2.jdbc.sybdrives. I am able to ping the connection in jag manager. My problem is in PowerJ 3.6.1. I setup a transaction object using the database wizard(very cool), change it to use a cache and even find the connection cache on the server. when I try to test the connection, I first select a profile jconnect5 and try the connection. I get this error: database connection failed jz006: cought a IoException java.net.connectionException connection refused, no further info. any ideas would be great! You can only...

Connection established
Huge problem at the moment: I am connected to the internet via Wifi (NetworkManager) - and Konqueror tells me I am ONLINE in our local library. They run an open network and users need to log in on a special website to get full internet access. As stated, my computer tells me I would be online, but I don�t have any connection (neither via FF, nor via Konqueror). Same applies when connected via Ethernet. Oh, and I�ve already tried to use and change settings with traditional method with ifup... Strange: In my own villa everything works perfect. * ANY HELP IS VERY MUCH APPRECTIATED. ...

Web resources about - 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 - asp.net.xml-web-services

Category:Awards established in 1973 - Wikipedia, the free encyclopedia
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. , a non-profit organization.

Does Facebook’s Board Of Directors Need More Experience In Established Companies?
The appointment earlier this week of Facebook Chief Operating Officer Sheryl Sandberg to the social network’s board of directors eliminated the ...

Friends of Mike Patterson Trust Established - Facebook
Friends Of Mike Patterson hat eine Notiz mit dem Titel Friends of Mike Patterson Trust Established geschrieben. Du kannst den vollständigen Text ...

Which Established Facebook Platform Apps Are Spreading Most Quickly Today?
On the first official day of Q3 2009, which established apps are still growing the most quickly? Here are the numbers from AppData on today’s ...

Beats by Dre Presents: LeBron James in ‬RE-ESTABLISHED 2014 - Powerbeats2 Wireless‬‬‬ - YouTube
The words “Akron Est. 1984” are inked on LeBron James’ body. Moving back to Cleveland in 2014 is the re-establishment of his legacy in Northern ...

Judicial watchdog established despite concerns from Bar Association
A new judicial watchdog has been established to hold judges and magistrates accountable for minor offences and to respond to complaints from ...

Canberra Raiders going against the tide in recruiting established representative players
The Canberra Raiders are going against the tide in attempting to recruit established representative players, with just 30 per cent of this year's ...

Sydney siege: Foundation established in memory of victim Katrina Dawson
The family of Sydney siege victim Katrina Dawson has established a foundation in her memory, and have also made plans for a memorial service ...

City to Gungahlin light rail community reference groups to be established
The ACT government has put the call out for members of new community and&nbsp;business reference group for the city to Gungahlin light rail project.&nbsp; ...

Newly established Men's Shed robbed, trashed - The Courier
SEBASTOPOL Men’s Shed members feel violated after their facility was broken into and valuable items were stolen.

Resources last updated: 2/9/2016 7:39:52 AM