0

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?

4

1 回答 1

0

SetCredentials 应该被调用两次,如下所示

hr = pIWinHttpRequest->SetCredentials(bstrUserName, bstrPassword, HTTPREQUEST_SETCREDENTIALS_FOR_SERVER);
hr = pIWinHttpRequest->SetCredentials(bstrUserName, bstrPassword, HTTPREQUEST_SETCREDENTIALS_FOR_PROXY);

之前称为“发送”

于 2010-02-16T11:54:48.260 回答