ASP.NET 表单在代理环境中丢失 POST 值

发布于 2024-12-12 00:41:42 字数 696 浏览 0 评论 0原文

我有一个 ASP.NET 表单(登录页面),当我将值 POST 到服务器时,请求通过代理传递,POST 参数最终会丢失,最终页面会刷新,因为没有 POST 参数。

问题是,这不是一个持续的问题,因为有时您可以正常登录,通常如果您清除浏览器临时文件,它就可以正常工作。

我运行 Fiddler 来检查发生了什么,基本上我得到:

  • 包含会话 id、POST 数据等的常规 POST 请求。响应 (HTTP 407) 包含代理身份验证:协商和代理支持:基于会话的身份验证header
  • 对服务器的下一个请求包含一个 Proxy-Authorization: Negotiate 标头,其中包含一个长字符串(我认为是 base64)。此请求不包含 POST 值。响应是另一个 407,实际上现在我查看它,Fiddler 显示“需要 HTTP/1.1 407 代理身份验证(访问被拒绝。)”作为标头。
  • 然后是第三个请求,其中包含 Proxy-Authorization 标头并返回 200 OK,但当然未发送 POST 值

后续请求会导致 HTTP/1.1 407 需要代理身份验证(ISA 服务器需要授权才能完成该请求。对 Web 代理过滤器的访问被拒绝)响应,然后是第二个成功但空的请求。

客户端不会让我绕过代理,因为它是间歇性的,并且应用程序中的所有其他页面(包括大量 Web 表单)都工作正常。

关于我可以尝试什么的任何想法?

I have an ASP.NET form (a login page), when I POST the values to the server, the request passes through a proxy and the POST pareameters end up getting lost and ultimately the page just refreshes as there are no POST parameters.

The thing is that this is not a constant issue as sometimes you can log in fine and generally if you clear your browser temp files it then works ok.

I ran Fiddler to check what's going on and basically I'm getting:

  • A regular POST request containing session id, POST data etc. The response (HTTP 407) contains a Proxy-Authenticate: Negotiate and Proxy-Support: Session-Based-Authentication header
  • The next request to the server contains a Proxy-Authorization: Negotiate header containing a long string (base64 i think). This request does NOT contain the POST values. The response is another 407 and actually now that i look at it Fiddler displays 'HTTP/1.1 407 Proxy Authentication Required ( Access is denied. )' as the header.
  • Then there's a third request that contains the Proxy-Authorization header and returns 200 OK, but of course the POST values weren't sent

Subsequent requests result in a HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ) response followed by a second successful but empty request.

The client wont let me bypass the proxy as it's intermittent and all other pages in the application (that include plenty of web forms) work fine.

Any ideas on what I can try?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文