My system Browser (IE) is proxy authenticated. I tried to download "www.google.com" using IWinHttpRequest it fails with status code 407 ( Need Proxy Authentication ) even after setting the user name and password using SetCredentials(...) for "www.google.com". The response text contains "cache access denied". How to solve this?
views:
34answers:
1
A:
SetCredentials should be called twice as follows
hr = pIWinHttpRequest->SetCredentials(bstrUserName, bstrPassword, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER);
hr = pIWinHttpRequest->SetCredentials(bstrUserName, bstrPassword, HTTPREQUEST_SETCREDENTIALS_FOR_PROXY);
before called "Send"
shankara
2010-02-16 11:54:48