Is it possible to do a cross page POST to an ASP.NET, from a static HTML form?

后端 未结 2 783
星月不相逢
星月不相逢 2021-01-23 21:52

I am trying to create a static HTML page which has a

which posts to a 3rd-party ASP.NET website.

Is this possible when the target website uses

相关标签:
2条回答
  • 2021-01-23 22:24

    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.)

    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.

    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.

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

    0 讨论(0)
  • 2021-01-23 22:33

    check out this question:

    How to POST Data to another web application (cross domain)

    Let me know, if you need help with my implementation.

    0 讨论(0)
提交回复
热议问题