xmlhttp Help with password protected page

M

Mangler

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"
 
M

Mangler

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








--
HTH,
Bob Barrows- Hide quoted text -

- Show quoted text -

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.
 
D

Dan

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

Forum statistics

Threads
474,056
Messages
2,570,443
Members
47,089
Latest member
Bobby2025b

Latest Threads

Top