The problem with the restriction approaches posed by Pan Thomakos is that it will prevent URLs with an invalid set of parameters from accessing your codebase, and you will be able to respond appropriately to the user (the user will see the page did not find an error, I believe).
If this meets your requirement, itβs fine, but a more convenient way for the user would be to move the parameter check to the appropriate controller, where in your action method you will go through the set of parameters obtained by this action method, and if they are not enough, you would build message senseull and returned it to the user through a notification:
source share