xmlhttp Help with password protected page

Mangler (2)

Usenet Archive
Joined
Apr 14, 2008
Messages
31
Reaction score
0
I am trying to figure out how to post data to a password protected webpage via xmlHTTP. If I remove the password protection from the page the data is being posted to, everything works as it should, however the page needs to have the restriction on it and I am unable to figure out how to get this to work. I tried supplying the username and password parameters of the open method but it is not working. Here is what I have, maybe I am just missing something that someone can help me with :

Dim url,xmlhttp

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
url = "http://URL"
xmlhttp.open "POST", url, false, "USERNAME", "PASSWORD" xmlhttp.setRequestHeader "Content-Type", "application/x-www-form- urlencoded" xmlhttp.send "sku=111111"
 

Mangler (2)

Usenet Archive
Joined
Apr 14, 2008
Messages
31
Reaction score
0
Could you describe your symptoms without using generic meaningless phrases like "not working"? Did you  look at these pages? You might find your own answer:http://www..aspfaq.com/search.asp?q=serverxmlhttp&x=6&y=6

Sorry, If I put the script on the page that the data is being posted to for password protection ( checking username session ), the error that gets returned is access denied.
 

Dan (3)

Usenet Archive
Joined
Sep 29, 2009
Messages
60
Reaction score
0
Mangler said:
I am trying to figure out how to post data to a password protected webpage via xmlHTTP. If I remove the password protection from the page the data is being posted to, everything works as it should, however the page needs to have the restriction on it and I am unable to figure out how to get this to work. I tried supplying the username and password parameters of the open method but it is not working. Here is what I have, maybe I am just missing something that someone can help me with :

Dim url,xmlhttp

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
url = "http://URL"
xmlhttp.open "POST", url, false, "USERNAME", "PASSWORD" xmlhttp.setRequestHeader "Content-Type", "application/x-www-form- urlencoded" xmlhttp.send "sku=111111"

Is the page being posted to using Kerberos (Integrated/NTLM) for authentication? See http://support.microsoft.com/kb/314404 and http://support.microsoft.com/kb/291008/EN-US/ for more details. The short answer is, it looks like ServerXMLHTTP doesn't support NTLM/Kerberos itself and you would need to configure the local proxy settings for this, or use Basic Authentication on the server being posted to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top