xmlhttp Help with password protected page

Discussion in 'ASP General' started by Mangler, May 5, 2010.

  1. Mangler

    Mangler Guest

    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, May 5, 2010
    #1
    1. Advertising

  2. Mangler

    Bob Barrows Guest

    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

    Mangler wrote:
    > 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"


    --
    HTH,
    Bob Barrows
     
    Bob Barrows, May 5, 2010
    #2
    1. Advertising

  3. Mangler

    Mangler Guest

    On May 5, 9:22 am, "Bob Barrows" <> wrote:
    > 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
    >
    >
    >
    >
    >
    > Mangler wrote:
    > > 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"

    >
    > --
    > 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.
     
    Mangler, May 5, 2010
    #3
  4. Mangler

    Dan Guest

    "Mangler" <> wrote in message
    news:...
    > 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.

    --
    Dan
     
    Dan, May 6, 2010
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    2
    Views:
    559
    Andreas Klemt
    Jul 5, 2003
  2. Replies:
    1
    Views:
    1,884
    Joshua Cranmer
    Oct 3, 2007
  3. AAaron123
    Replies:
    2
    Views:
    2,185
    AAaron123
    Jan 16, 2009
  4. AAaron123
    Replies:
    1
    Views:
    1,344
    Oriane
    Jan 16, 2009
  5. yawnmoth

    Msxml*.XMLHTTP vs. Microsoft.XMLHTTP

    yawnmoth, Nov 7, 2006, in forum: Javascript
    Replies:
    11
    Views:
    389
    Matt Kruse
    Nov 9, 2006
Loading...

Share This Page