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?
Asked
Active
Viewed 377 times
1 Answers
0
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"

Joachim Sauer
- 302,674
- 57
- 556
- 614

shankara
- 1