使用 Windows 身份验证、AJAX、ASMX 和外部 ISA 的 HTTP 401 过多

发布于 2024-09-10 06:45:11 字数 492 浏览 0 评论 0原文

环境:

  • ASP.NET WebForms
  • .NET 3.5
  • jQuery for AJAX
  • ASMX Web 服务
  • Windows 身份验证
  • SSL

当我们运行生产 Web 应用程序时,我们的 AJAX 调用通常会出现 2-3 个 HTTP 401,然后才会收到我们的请求。 HTTP 200。

这正常吗?
我们可能做错了什么吗?

注意: 调用不会失败,401 会尝试直到成功。

流量示例:
替代文本

Enviornment:

  • ASP.NET WebForms
  • .NET 3.5
  • jQuery for AJAX
  • ASMX web services
  • Windows Authentication
  • SSL

When we run our production web application, our AJAX calls often have 2-3 HTTP 401s before we get our HTTP 200.

Is this normal?
Is there something we may be doing wrong?

NOTE: The calls do not fail, the 401s try until they succeed.

Example Traffic:
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

匿名的好友 2024-09-17 06:45:11

这是 NTLM 样式集成 Windows 身份验证的正常流量。顺序大致为:

  1. 客户端:HTTP GET url...
  2. 服务器:HTTP 401 谁去那里
  3. 客户端:这是我,客户端!
  4. 服务器:HTTP 401 YEAH PROVE IT
  5. 客户端:我在这里已经得到了您需要的所有证据。
  6. 服务器:HTTP 200 OK

如果您查看服务器的原始响应,您应该会看到协商标头以及相应的编码/来自客户端的加密请求。

That's normal traffic for NTLM-style Integrated Windows authentication. The sequence is roughly:

  1. Client: HTTP GET url...
  2. Server: HTTP 401 WHO GOES THERE
  3. Client: It's-a me, the client!
  4. Server: HTTP 401 YEAH PROVE IT
  5. Client: I've got all the proof you need right here.
  6. Server: HTTP 200 OK

If you look in the raw responses from the server, you should see the Negotiate headers, and the corresponding encoded / encrypted requests from the client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文