是否可以从静态 HTML 表单对 ASP.NET 执行跨页 POS

Is it possible to do a cross page POST to an ASP.NET, from a static HTML form?(是否可以从静态 HTML 表单对 ASP.NET 执行跨页 POST?)
本文介绍了是否可以从静态 HTML 表单对 ASP.NET 执行跨页 POST?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个静态 HTML 页面,该页面具有一个

,该页面发布到 3rd-party ASP.NET 网站.

I am trying to create a static HTML page which has a <form> which posts to a 3rd-party ASP.NET website.

当目标网站使用 ASP.NET webforms 时,这可能吗?

Is this possible when the target website uses ASP.NET webforms?

推荐答案

这绝对有可能.您可以在任何地方向任何网站发布 POST.(在设计接受来自网络商家(例如 PayPal)的 POST 的应用程序时,请记住这一点;-) 确保您知道 POST 来自何处.)

This is absolutely possible. You can issue a POST to any website, anywhere. (Keep this in mind when you're designing an application that accepts POSTs from a web merchant such as PayPal ;-) make sure you know where the POST is coming from.)

网站是否会接受您的请求,当然取决于服务器端代码的编程方式.如果您正在向 ASP.NET WebForms 应用程序发送 POST 请求,并且该应用程序并非设计为接受第三方 POST,那么您将很难让 POST 参数看起来像是来自 WebForms 页面.例如,网站将寻找加密的视图状态等.

Whether or not the website will accept your request, of course, is up to however the server-side code was programmed. If you're POSTing to an ASP.NET WebForms app and the app wasn't designed to accept third-party POSTs, then you're going to have a hard time making your POST parameters look like they came fro ma WebForms page. For example, the website will be looking for the encrypted viewstate, among other things.

您可以使用 firebug 或其他一些工具从 webforms 应用程序中嗅探 POST 数据,然后将该数据复制到您的静态 HTML 页面中......它可能会起作用.

You could use firebug or some other tool to sniff the POST data from the webforms app, and then replicate that data in your static HTML page .... it might work.

您是否对 ASP.NET Webforms 应用程序有任何编程控制权?

Do you have any programming control over the ASP.NET Webforms app at all?

这篇关于是否可以从静态 HTML 表单对 ASP.NET 执行跨页 POST?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)
Bind multiple parameters from route and body to a model in ASP.NET Core(在ASP.NET Core中将路由和主体中的多个参数绑定到一个模型)
Custom model binding in AspNet Core WebApi?(AspNet Core WebApi中的自定义模型绑定?)
How to minify in .net core mvc view?(如何在.Net核心MVC视图中缩小?)