473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

WinHttp.WinHttpRequest and POST.....why not work??

I have the following codes in an asp file. This page can receive the XML string send from client.
==================================================
Dim objReceive
Set objReceive = Server.CreateObject("Microsoft.XMLDOM")
objReceive.async=false

On Error Resume Next
objReceive.load(Request)

if objReceive.xml <> "" then
Dim objWinHttp
Dim strHTML

Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
'Set objWinHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
objWinHttp.Send objReceive.xml

Response.Write( "Status: " & objWinHttp.Status & " " & objWinHttp.StatusText)
strHTML = objWinHttp.ResponseText
Set objWinHttp = Nothing

else
Response.Write( "You have reached a secure site." )
end if
================================================== =

objReceive.xml ===> contains the XML string from client
After receiving the XML string, the string need to be sent to another page, http://localhost/bank/Trx.asp.

objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
But I cannot get the XML string in the Trx.asp, anything wrong with my code?
The 3rd parametere should I use false or true?

It's a simple code, but I still cannot figure out what is wrong. Pls comment. Thanks a lot.

Jul 19 '05 #1
1 20004
I would start by removing "On Error Resume Next" to avoid hiding a possible
runtime error. Do you have an error now when running this code ?

The doc is at :
http://msdn.microsoft.com/library/de...quest_open.asp

Patrice

--

"Francis" <Fr*****@discussions.microsoft.com> a écrit dans le message de
news:CB**********************************@microsof t.com...
I have the following codes in an asp file. This page can receive the XML string send from client.

==================================================
Dim objReceive
Set objReceive = Server.CreateObject("Microsoft.XMLDOM")
objReceive.async=false

On Error Resume Next
objReceive.load(Request)

if objReceive.xml <> "" then
Dim objWinHttp
Dim strHTML

Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
'Set objWinHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
objWinHttp.Send objReceive.xml

Response.Write( "Status: " & objWinHttp.Status & " " & objWinHttp.StatusText) strHTML = objWinHttp.ResponseText
Set objWinHttp = Nothing

else
Response.Write( "You have reached a secure site." )
end if
================================================== =

objReceive.xml ===> contains the XML string from client
After receiving the XML string, the string need to be sent to another page, http://localhost/bank/Trx.asp.
objWinHttp.Open "POST", "http://localhost/bank/Trx.asp", false
But I cannot get the XML string in the Trx.asp, anything wrong with my code? The 3rd parametere should I use false or true?

It's a simple code, but I still cannot figure out what is wrong. Pls comment. Thanks a lot.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: thueirby | last post by:
h when i try to get data from site with clients sertificates with winHttp, I have a problem with result encoding (ru). Its OK with any sites without client sertificates, and its OK when i try to...
0
by: kaushalmbhavsar | last post by:
I am working on one VB.NET application where I am using WinHttp.dll to post request on website. First request is for Login Page and I have gone through all input types of that page and pass those...
3
by: kaushalmbhavsar | last post by:
I am working on one VB.NET application where I am using WinHttp.dll to post request on website. First request is for Login Page and I have gone through all input types of that page and pass those...
1
by: Gaetan | last post by:
I'm doing a prrof of concept to develop an application to run under WinPE. The application will use WinHTTP to send requests to an ASPX file running IIS 6.0 My problem is that I do not know how...
0
by: teju | last post by:
Hi, I have an application which is supposed to alert me whenever it gets response status other than 200. How do i make sure that it alerts me only when it has got the response text from the server...
1
by: flyingchen | last post by:
The problem is about the new version of the WinHttp.dll. My Code like this : public string Do(string Method,string Url,Object Async) { WinHttpRequest winHttpReq = new...
2
by: flyingchen | last post by:
The problem is about the new version of the WinHttp.dll. My Code like this : public string Do(string Method,string Url,Object Async) { WinHttpRequest winHttpReq = new...
5
by: neilx | last post by:
I have a WinHttp.WinHttpRequest.5.1 object that works perfectly when GETing .htm pages, but times out when trying to GET .asp pages. I have tried using setCredentials: Set Http =...
0
by: Brian Pitt | last post by:
Hi I am trying to use WinHttp.WinHttpRequest.5.1 to access an https (ssl) page on an Oracle-Application-Server-10g and I keep getting a -2147483638 error. I am able to use the exact same script...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.