【问题标题】:Issue: 401 - Unauthorized: Access is Denied Due to Invalid Credentials问题:401 - 未经授权:由于凭据无效而拒绝访问
【发布时间】:2012-04-20 15:42:44
【问题描述】:

在 Android 中,我试图从“HTTPS”站点获取数据,并且该站点使用 NTLM 凭据、身份验证,当我连接站点(客户端。执行)时,它会给出响应:

“401 - 未经授权:由于凭据无效,访问被拒绝。”

我正在设置 UsernamePasswordCredentials、networkcredential,但响应保持不变。

我也按照http://hc.apache.org/httpcomponents-client-ga/ntlm.html 的说明进行操作 和 http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html

但响应保持不变。

【问题讨论】:

    标签: android https ntlm


    【解决方案1】:

    我有同样的问题,我读了很多关于它的信息。但我有一个“答案”,告诉你如何解决它。

    问题是 HttpClient 类,因为它不支持 NTLM 连接,但是,现在 HttpClient api (4.2) 可以支持它。

    我在 Apache 页面上读到了它,所以您必须下载 HttpClient 4.2 版本并将其添加到您的项目中。使用那个 HttpClient 类,然后继续工作。

    You can download here:

    我现在发布它是因为有些人可以在这里找到解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-17
      • 1970-01-01
      • 2023-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-19
      相关资源
      最近更新 更多