views:

109

answers:

1

What set of Windows API calls will allow downloading a web resource (specifically an XML document) when the site is protected using Digest authentication without having to enter a username and password?

I can use MSXML's “open” function on the IXMLHTTPRequest interface, but it requires a username and password to be supplied even though I'm logged on to the Windows domain server.

Internet Explorer can accomplish this task without requiring me to enter this information.

+1  A: 

I'm not familiar with this particular API. But it looks like there is a function to set a request header called setRequestHeader so have you tried adding the following line directly to the request header?

Authorization: Basic %s\r\n

Note: %s is name:password in base64 encoding.

KPexEA