gpt4 book ai didi

java - NTLM 身份验证方案选择错误

转载 作者:行者123 更新时间:2023-12-02 09:06:22 28 4
gpt4 key购买 nike

我正在用java开发一个应用程序,以从交换服务器(版本10)获取电子邮件附件,我有Windows 7(32位)电脑。我的代码编译成功,但在运行时出错,说-

May 20, 2013 5:58:46 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: NTLM authentication scheme selected
May 20, 2013 5:58:47 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFO: Failure authenticating with NTLM <any realm>@autodiscover.mydomain.com:443


我的代码是 -

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
ExchangeCredentials credentials;
credentials = new WebCredentials("myuser", "mypwd","mydomain");
service.setCredentials(credentials);
service.autodiscoverUrl("user@domain.com");

如何解决此 NTLM 身份验证错误?

最佳答案

启用跟踪:service.setTraceEnabled(true);您确定您的 Exchange 版本是 2010 吗?使用this检查指南

也尝试删除 service.autodiscoverUrl("user@domain.com");

关于java - NTLM 身份验证方案选择错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16649678/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com