views:

24

answers:

1

I am trying to send and receive XML from a website using ASP.NET C# application.

I tried both httpwebrequest and webclient, and both of them throw exception:

"Unable to connect to the remote server. No connection could be made because the target machine actively refused it" followed by the IP Address I think.

Now, is there a site out there that I can use for testing purposes so that I know whether the problem is on my end or the site's?

P.S. If I visit the URL using my browser, then it is fine.

A: 

An active connection refusal could mean either you're using the wrong port, or you don't have a route to the target IP (or the target is not up and running in the first place.)

Is your browser running on the same machine as IIS? If not, can you try the connection from the same machine? You should first eliminate the possibility of a routing problem.

Ates Goral
I'm sending the XML to a third-party website. this is the URL I'm trying to connect to: https://wwwcie.ups.com/ups.app/xml/RateDoes your comment still apply? I'm lost :)
progtick
Asked them if they provide a C#/.NET sample. The calling mechanism may be harder than you expected.
Lex Li