我正在开发一款用Java编写的应用程序,从Exchange Server(版本10)获取电子邮件附件。我使用的是Windows 7(32位)的个人电脑。我的代码已经成功编译,但运行时出错,提示如下-
如何解决NTLM身份验证错误?
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身份验证错误?