In MVC application My Current Route Config is:
routes.MapRoute(
"PaymentInformation",
"PaymentInformation.aspx/{resNum}",
new { controller = "Reservation", action = "Edit", resNum = UrlParameter.Optional }
);
It calls below mentioned method when we hit this Url: https://www.example.com/PaymentInformation.aspx
HttpGet]
[ValidateRequest(true)]
public ActionResult Edit(string resNum)
{
ReservationPresenter reservationPresenter = new ReservationPresenter();
return View(reservationPresenter);
}
What I want is that when Querystring is passed (in GET Method) then the same above method/Action above should not be called and I just want to Show a Message.
The URL with Querystring should be like this: https://www.example.com/PaymentInformation.aspx?xyz
Can please anyone suggest me what will be MapRoute in Route Config.
In breif what we want is that Any request with sensitive information sent over a GET method should be rejected by the application.