V
V
Vadim2014-12-20 22:42:21
ASP.NET
Vadim, 2014-12-20 22:42:21

How to allow POST request only from specific server in asp.net?

It is necessary to allow only one server to accept POST requests, for example, I forbid the user to use a GET request to a specific action method, but no one bothers him to write a script that will send POST to a private method.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2015-01-23
@Werawoolf

I'm doing a submit from an html page and as one of the parameters I'm specifying the address to receive the response. After processing, the third-party system sends a request to this address.

<form method="post" action="@Model.action_url" id="payForm" name="form1">
       <input type="hidden" name="backurl" value="@Model.backurl">
</form>

Well, after the submission, for example, processing will take place at /TestController/TestMethod.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question