
Problem with xmlhttp post
I have and activex application that post some data from a webpage back to an
asp page on the server. This pages job is to read the xml data and update
the database. I am doing the same thing in reverse to load the activex
control on the web page and it works fine. I can't figure out why I am not
getting the post data. I have a message box on the activex so I know that
obSteam.readtext is loaded and there is a file being created call got.txt
but it is always empty.
Activex Code to post the data
Dim xmlhttp As XMLHTTP30
Set xmlhttp = New XMLHTTP30
Dim objStream As ADODB.Stream
Set objStream = New ADODB.Stream
objStream.Mode = 3 ' Read/Write mode
objStream.Open
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Fields.Append "imageguid", adVarChar, 100
rs.Fields.Append "annotationblob", adVarChar, 10000
rs.Fields.Append "annotationText", adVarChar, 1000
rs.Open
rs.AddNew
rs!imageguid = m_imageid
rs!Annotationblob = hexdata
rs!AnnotationText = TextString
rs.Save objStream, adPersistXML
Call xmlhttp.Open("POST", "URL", False)
xmlhttp.setRequestHeader "Content-Type", "text/text"
'xmlhttp.send objStream.ReadText
rs.Close
Set rs = Nothing
ASP Page, just to verify the data is getting there
<%
if Request("REQUEST_METHOD")="POST" then
dim oo
set oo = createobject("Microsoft.XMLDOM")
oo.async=false
oo.LoadXml(Request.form)
set fso = Server.CreateObject("Scripting.FileSystemObject")
set fp = fso.OpenTextFile("C:\GOT.TXT",2,true)
fp.write oo.documentElement.xml
fp.close
end if
%>
Thanks in adance for your help