cancel
Showing results for 
Search instead for 
Did you mean: 

AIM Sample code - close connection error

Sorry, but I am new to Authorize.net and tried to run the AIM example in c# and I received the error

An existing connection was forcibly closed by the remote host. 

 I have the login id and transaction key supplied to me from Authorize.net.

Anyone know why I am getting this error ?

Thanks

kjaworski
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

I get The error Immediately when I execute the example solution.

View solution in original post

14 REPLIES 14

How long does it run before being killed? There are a variety of things that could cause this, for instance the test server having too many requests and killing some to reduce load, or the connection staying open for too long, or whatever. If you continue having this problem, I would suggest ticketing from your account and having Authorize.net check into it. It may just be the test server acting up.

TJPride
Expert

I get The error Immediately when I execute the example solution.

Well I ran the code today, and it ran fine.  Iguess it was authorize.net

Thanks for the reply

I am back to square one,  It ran successfully once and since then I get the same error that the connection was closed by the remote host.  I am using the AIM C# example and only changed the login id and trans key to the ones that they sent me.  Can anyone help me out? 

What I want to get to is to just have a c# script send them the information and receive it so I can then store the results in a table.  Does anyone have an example of that ?

Thank You

It's remotely possible that the cert in the SDK just expired, since it was set to expire around now. Don't know if that would make a difference. I'm not very familiar with C#, but is there a way to connect in debug or verbose mode so you can get a readout of what precisely is going on?

The SSL issue that TJPride referred to was exclusive to PHP and the unique way that it verifies the certificate as valid, it would not be relevant if you are using C#.  Unfortunatley, I don't have any good suggestions for you other than to investigate potential connectivity issues at your host.

I changed the  url from https://test.authorize.net/gateway/transact.dll

to  https://active.authorize.net/gateway/transact.dll  and I actually received a response telling me my api login or trans key is invalid.

so I kind of know the program is sending and receiving data, but I don't know why the test account at that URL is not working.  I set up a test account and double checked the login id and trans code. 

Any ideas ?

Thanks

Do you get any error if you just open https://test.authorize.net/gateway/transact.dll in the web browser?

Yes,  It says I can't connect to the web site.