By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,901 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

HttpWebRequest

P: n/a
A little about what I am trying to accomplish

I am tyring to do a HttpWebRequest to a company called Paymentech.

Here are some of there requirements:
It supports one method of communication - HTTPS
I will only be doing HTTP POST requests.
The web address are as follows.
orbitalvar1.paymentech.net/authorize on port 443
Now the XML gateway URL must be accessed using the https protocol. But
interfacing to the Orbital Gateway using SSL does not require us to have a
certificate. The Orbital Gateway uses a non-authenticated SSL session,
meaning the client is not authenticated using a digital certificate as a
component of the SSL negotiation.
The Orbital Gateway uses source IP authentication to authenticate the
request generation. This is only true for the production system, the
development system will not need this.

This is the code I have to try to send the xml:
Dim xmlDoc As New XmlDocument
xmlDoc.Load("C:\CreditCardAuth.xml")
Dim request As HttpWebRequest =
CType(HttpWebRequest.Create("https://orbitalvar1.paymentech.net:443/authorize"),
HttpWebRequest)
request.Method = "POST"
Dim requestData As Byte() =
System.Text.Encoding.UTF8.GetBytes(xmlDoc.OuterXml )
request.ContentLength = xmlDoc.OuterXml.Length
Dim requestStream As Stream = request.GetRequestStream
requestStream.Write(requestData, 0, requestData.Length)
requestStream.Flush()
requestStream.Close()
Dim response As HttpWebResponse = CType(request.GetResponse,
HttpWebResponse) Dim responseData As StreamReader = New
StreamReader(response.GetResponseStream)
Dim sendData As Byte() = System.Text.Encoding.UTF8.GetBytes(xmlDoc.OuterXml )

I am getting this error on the requestStream
The underlying connection was closed: Unable to connect to the remote
server.
TIA,
Brett
Jun 23 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.