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

WEB REQUEST

P: n/a
Hi,

I am trying to write a class to interface with a payment gateway (via an XML
string). I have managed to get this to work using the VB6 version of code,
but would rather like to use the .net webrequest/response techniques.

The VB6 style code I am using that works is as follows:

Dim xbroker As New MSXML2.ServerXMLHTTP

xbroker.open("POST", "http://127.0.0.1:5001/", False)
xbroker.send(stXML)
MsgBox(xbroker.responseText)

............

The VB.NET code that is currently coming back with "(100) Timeout reading
from socket" is as follows:

Dim req As WebRequest
Dim rsp As WebResponse
Dim stResult As String

req = WebRequest.Create("http://127.0.0.1:5001/")
req.Method = "POST"
req.ContentType = "text/xml"

rsp = req.GetResponse

reader = New StreamReader(rsp.GetResponseStream)

MsgBox(reader.ReadToEnd)

reader = Nothing

If Not rsp Is Nothing Then rsp.GetResponseStream.Close()
.............................

Any ideas please?

Thanks in anticipation,

Carl


Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try the ASP.NET group.
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.