将表单从一个 HTTPS 发布到另一个 HTTPS 站点会导致安全警报
我需要将一个字符串从 .NET 站点发布到托管在同一服务器(不同虚拟目录)上的经典 ASP 站点。
https://example.com/DOTNETSite/Sender.aspx
到
https://example.com/ClassicASP/SomeFolder/Target.asp
Target.asp 页面有 3 种方法来处理传入数据:
- 表单发布
- 查询字符串
- 标头
我无法传递我的查询字符串中的数据。所以这个选项已经不存在了。我正在通过在服务器端构建表单并吐出 javascript 代码来执行 form.submit() 来尝试 Form post 方法。但这会导致 Internet Explorer 向用户发出安全警报。我们想避免这种情况。请让我们知道克服这种情况的最佳方法是什么。非常感谢。
I need to post a string from a .NET site to a Classic ASP site which are hosted on the same server (different virtual directories).
https: //example.com/DOTNETSite/Sender.aspx
to
https: //example.com/ClassicASP/SomeFolder/Target.asp
Target.asp page has 3 ways to handle incoming data:
- Form Post
- Query String
- Headers
I cant pass my data in query string. so that option is out. I am trying the Form post method by building a form on the server side and spitting out javascript code to do a form.submit(). But this is causing a internet explorer to throw a Security Alert for the user. We want to avoid this. Please let us know what is the best way to overcome this situation. Thanks a ton.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在你正在做:
相反你应该使用:
也就是说(如果还不够清楚),让它将表单发送到您自己的服务器。
当您的服务器收到表单时,它应该将其发送到目标服务器。
在基本层面上,这是可行的。但是,如果用户应该在第二台服务器等上登录,您可能会遇到问题。
我将尝试用 PHP 来说明一个示例:
文件:form.html
文件:send .php
Right now you are doing:
Instead you should use:
That is (if it wasn't clear enough), make it send the form to your own server.
When your server receives the form, it should send it to the target server.
On a basic level, this works. However, you may get issues if the user is supposed to be logged in on the 2nd server etc.
I'll try to illustrate an example in PHP:
File: form.html
File: send.php