1

I have a c++ application which using NTLM authentication method (WinHttpSetOption). what I'm trying to do is to set the credentials, meaning: the NTLM uath is using the logged on credentials, I want to provide him the credentials myself (in domain\user format).

From the MSDN I see that the WinHttpSetCredentials doesn't affect.

Can someone help me please?

4

1 回答 1

2

看看WinHttpSetOption使用WINHTTP_OPTION_AUTOLOGON_POLICY.

http://msdn.microsoft.com/en-us/library/aa384066.aspx#WINHTTP_OPTION_AUTOLOGON_POLICY

如果您将该值设置为WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH,则它会阻止 WinHttp 提供默认凭据,并且您可以在收到正确的 401/407 响应时使用WinHttpSetCredentials.

于 2011-09-22T20:01:46.440 回答