Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 779
  • Last Modified:

"The login request was denied" Access 2003 XMLHTTP under Windows XP

When running some VB on a windows XP machine running Access 2003, I get the following error:

Runtime error ‘-2147012881 (80072eef)’:

The login request was denied.

Open in new window


when the script reaches the xmlhttp.send command.  The xmlhttp.open command is as follows:
xmlhttp.Open "POST", "https://fakeurl.com/xml", False, "username", "secret"

Open in new window


This works in Windows vista 32/64 bit, Windows 7 32/64 bit, and in Access 2003/2007/2010 in Vista/Windows 7.  The only OS it does not work in under any version of Access is XP.

Any ideas?
0
lorsungcu
Asked:
lorsungcu
  • 3
  • 2
1 Solution
 
Nico BontenbalCommented:
Could it be Vista and 7 have a newer version of the XMLHTTP?
http://en.wikipedia.org/wiki/MSXML#Versions
0
 
lorsungcuAuthor Commented:
I have checked,  and they all have the latest version.  I have a feeling its not sending the login/password formatted correctly, but i dont know how to test for that.  I dont have access to the logs on the remote webserver.
0
 
Nico BontenbalCommented:
Well, sorry, I don't have any other suggestions then.
0
 
lorsungcuAuthor Commented:
I fixed this by re-writing the auth portion of the code from this:

Set objSvrHTTP = New ServerXMLHTTP
objSvrHTTP.Open "POST", "https://urlhere", False, "username", "secret"
objSvrHTTP.setRequestHeader "Accept", "application/xml"
objSvrHTTP.setRequestHeader "Content-Type", "application/xml"

Open in new window


to this:

Set swvxRequest = New MSXML2.XMLHTTP
With swvxRequest
    .Open "POST", "https://urlhere", False, "username", "secret"
    .setRequestHeader "Accept", "application/xml"
    .setRequestHeader "Content-Type", "application/xml"
    .send (xml)
End With

Open in new window


Now works in windows 7 32/64bit, Vista 32/64bit and XP 32/64bit.
0
 
lorsungcuAuthor Commented:
Figured it out myself.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now