Basic Authentication

V

Vittorio Pavesi

Hello,
I'm using MSXML2.ServerXMLHTTP to get a web page using an url with basi
c authentication (e.g. http://user:[email protected]).

Microsoft denied basic authentication within Internet Explorer URL (see
KB 834489) so I'm unable to get the page contents.

The client-side workaround is to change some registry settings (see
http://support.microsoft.com/kb/834489), anybody can help me with a
different solution ?

Thanks


Vittorio Pavesi
 
R

Ray Costanzo [MVP]

Pass the username and password in the .Open method.

yourObject.Open "GET", "http://....", False, "[domain\]username", "password"

Ray at work
 
V

Vittorio Pavesi

Ray Costanzo [MVP] ha scritto:
Pass the username and password in the .Open method.

yourObject.Open "GET", "http://....", False, "[domain\]username", "password"

Ray at work

Hello Ray,
I tested it but seems that it get only the text, If I've some <img tags,
they are not printed because the images aren't downloaded.
Any suggestion ?

Vittorio
 
P

Patrice

My first guess is that the img tags are just using a relative URL. As soon
as you move the HTML code somewhere else it doesn't work any more. Check the
HTML code to see if this behavior is expected (you can add then a base href
tag to make those relative URL relative to the URL you put there).

--
Patrice

Vittorio Pavesi said:
Ray Costanzo [MVP] ha scritto:
Pass the username and password in the .Open method.

yourObject.Open "GET", "http://....", False, "[domain\]username", "password"

Ray at work

Hello Ray,
I tested it but seems that it get only the text, If I've some <img tags,
they are not printed because the images aren't downloaded.
Any suggestion ?

Vittorio
 
R

Ray Costanzo [MVP]

Yes, exactly. All it's going to return is the HTML. It's just text.

Ray at work

Patrice said:
My first guess is that the img tags are just using a relative URL. As soon
as you move the HTML code somewhere else it doesn't work any more. Check
the
HTML code to see if this behavior is expected (you can add then a base
href
tag to make those relative URL relative to the URL you put there).

--
Patrice

Vittorio Pavesi said:
Ray Costanzo [MVP] ha scritto:
Pass the username and password in the .Open method.

yourObject.Open "GET", "http://....", False, "[domain\]username", "password"

Ray at work

Hello Ray,
I tested it but seems that it get only the text, If I've some <img tags,
they are not printed because the images aren't downloaded.
Any suggestion ?

Vittorio
 

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
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top