Link to home
Start Free TrialLog in
Avatar of TEKGOD666
TEKGOD666

asked on

Server XMLHTTP form post error: msxml4.dll error '80070005'

' This is the code:

Dim DataToSend

DataToSend = (Request.BinaryRead(Request.TotalBytes))

Set objSXH = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
objSXH.open "POST", "https://merchants.scandorderinc.com/pos/pos_entrypoint.cfm", False
objSXH.setRequestHeader "Content-Type", "text/xml"
objSXH.send DataToSend

POST Succeeded
If objSXH.status = 200 Then
      Response.Write "The POST succeeded. " 
Else
      Response.Write "The POST failed: (" & objSXH.status & ") " & _
            objSXH.statusText
End If


' When that is run, the error reads: msxml4.dll error '80070005'
' The server is Windows NT server, it has all of the patches & hotfixes up to date. It has both MSXML Parser 4.0 SP2 & MSXML Parser 3.0 SP 5 installed. I have tried using one or the other & I get the access error when I try MSXML2.ServerXMLHTTP.4.0 & I get a "Server object error 'ASP 0177 : 80040111' Server.CreateObject Failed ClassFactory cannot supply requested class " when I try MSXML2.ServerXMLHTTP.3.0. I have already read up on both errors & KB articles on MDSN & each provide a solution for Windows 2000 servers & up regarding group policy permissions & such, but I have yet to find a solution for Windows NT Server 4.0, which is what I am running. I have tried just about everything & I am stumped. Any help would be greatly appreciated.
Avatar of rdcpro
rdcpro
Flag of United States of America image

Well, this is a long shot, but ServerXMLHTTP uses WinHttp, which I don't think is actually packaged in the MSXML installer.  This should be present on Win2k and above, though, but I'm not sure about NT 4.0.

One other thing, does it work when you post to a non SSL address?  

Regards,
Mike Sharp  
Avatar of Duane Lawrence
Looks like VB code is involved.  Here is a known bug with that.

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q278/0/13.asp&NoWebContent=1

RESOLUTION
To resolve this problem, assign Windows NT File System (NTFS) Read and Execute file permissions to the Everyone group (or to the appropriate users) for VB run time (Msvbvm60.dll). VB run time is usually located in the Winnt\System32 folder.
Avatar of TEKGOD666
TEKGOD666

ASKER

1) I have tried doing the non-SSL link & the same error is returned (access denied)

2) cant use winhttp because I am going to be parsing xml -- & it needs to be server side

3) I have granted all rights to the actual dll & still no luck

What I am looking for is a workaround with Windows NT server. With Windows 2000 server & up I understand that you can just run mmc & configure the group policies but the necessary snap-on is not available in NT.
Actually, MSXML2.ServerXMLHTTP.4.0 uses WinHttp itself for server-side processing.  That's how it makes HTTP connections--there is no other mechanism.  WinInet is the client side version, but it's not used here.  

But this could also be a proxy issue.  Have you run proxycfg.exe?  
Yes I have & unfortunately still no change.

Any other suggestions? I am totally stumped.
Can you tell which line the failure is occurring on?  
If you are referring to the proxycfg.exe==== Well from command prompt the program just opens a dos window for a very brief moment & disappears. I also tried the longer prompt method & the same happened.

Is there another method of posting form data server side aside from ServerXMLHTTP or WinHttp? Or is there a way around this access denied error on Windows NT?
I can't really think of any other way, unless you roll your own TCP stack and build your own library.  There may be open source versions of some sort of HTTP service, but finding one to compile for NT 4.0 might be hit or miss.

WinHTTP 5.0 runs on NT 4.0 as long as you have IE 5.01 installed, but unfortunately Microsoft does not provide a download of it any more, and has terminated product support for it as of October 1 this year.  It's documented in the Windows Platform SDK, so if you can find an older version of the SDK, you might be able to construct a custom solution using it.  I don't know if MSXML will use WinHTTP 5.0 if 5.1 is not available.  I do know that 5.1 does not run on NT 4.0, however.  But WinHTTP is also accessible from script and Microsoft Visual Basic through the WinHTTP object. For descriptions of the individual functions, see the WinHTTP functions reference for the specific language.


Here's some more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/about_winhttp.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/winhttp_versions.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/porting_wininet_applications_to_winhttp.asp


Proxycfg.exe just configures WinHttp to work with a proxy server.  Autoproxy isn't supported in WinHTTP 5.0; that was added to Version 5.1. so you have to manually configure WinHTTP to work with a proxy.   I don't know if there was an older version of proxycfg.exe.  In any case, proxycfg has to be configured with command line parameters. When no parameters are specified, the current WinHTTP proxy settings are displayed, so open a command prompt, and run it from there.  Don't just double click the executable, because the window will close (as you've noticed).  Configuration information can be found at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/proxycfg_exe__a_proxy_configuration_tool.asp

If all else fails:

It's beginning to look to me like you can't implement an HTTP client stack on NT 4.0 any more, unless you use WinInet.  So in that case, you may have to use the old MSXML 2 parser to make the request, then load the response into a DOM Document object.  But MSXML 3 sp1 or later installes by default in replace mode, so even if you try to instantiate MSXML 2, you get MSXML 3.  If the MSXML 3 WinInet version of the XML HTTP Request object won't work, you'll have to use the xmlinst.exe utility to install MSXML 3 in side-by-side mode.  

But before you do that, see if the Wininet version works by changing:

Set objSXH = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
to
Set objSXH = Server.CreateObject("MSXML2.XMLHTTP")
or even
Set objSXH = Server.CreateObject("Microsoft.XMLHTTP")

Use that last one as a last resort, though. Then try the side-by-side registration of MSXML 3 with xmlinst.exe.  Again, this is run from the command line.  Double clicking it won't get you anywhere.

Good luck.  You may yet be forced to upgrade the OS!

Regards,
Mike Sharp



You are definately right about needing to upgrade the os, which should happen in January.

In the meanwhile I have tried using winhttp 5 but keep getting this error:

WinHttp.WinHttpRequest error '80072efd'

A connection with the server could not be established

I looked up the error & apparently it has something to do with sending binary data using NT authentication to a Windows 2000 server running winhttp services. http://support.microsoft.com/kb/823492
Microsoft posts a solution for Win 2000 but not for NT. Is there any interim solution available for Win NT or do I just have to wait for the OS upgrade?
Never mind that last comment I found out that the other server was down temporarily for maintenance.


BUT I am using the WinHttp post but it is not sending the form data on the second page.

Here is how I am trying to do it:

<%
Dim PostData
PostData = Cstr(Request.BinaryRead(Request.TotalBytes))
Set WinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
WinHttp.Open "PUT", "https://merchants.scandorderinc.com/pos/pos_entrypoint.cfm", false

WinHttp.Send PostData
Dim ResponseText                           ' Send request using https
ResponseText = WinHttp.ResponseText    ' assign to local variable

Response.Write ResponseText & 
%>

What am I doing wrong? Thanks.
That's a PUT not a POST.  Don't you want the post?

Regards,
Mike Sharp
Yes. I also tried the POST though & it still didnt work. I am getting information from the remote server but my FORM data is not posting to it. Suggestions>?
ASKER CERTIFIED SOLUTION
Avatar of rdcpro
rdcpro
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK well adding the headers allowed me to post the form data to the server, which was the most important thing --- thank you very much for your efforts. ALTHOUGH in the responsetext the unspecified error appears (winhttp3.dll unspecified error)  --- but I dont need to display the responsetext so no big deal.

I will now have to figure out how to parse the xml strings that are returned as a result, but that is secondary I will just how to figure out the nuances of xml dom or whatever data islands.

Thanks your continues replies have been extremely helpful.
*whew!*

For a while there, I didn't think  you were going to get this nailed down!

Regards,
Mike Sharp
well it wasnt nailed 100% but the post worked & I guess thats all that matters until the os upgrade.

Thanks again