What you can do is check the return value of
PageMethodsEngine.InvokeMethod. If it's false, none of the defined
pagemethods matched the provided url, and you are free to handle this
error in any way you see fit.
Here is the code executed in BasePage.OnLoad:
if (!IsPostBack)
if (!PageMethodsEngine.InvokeMethod(this, _HandleDefaultMethod))
throw new PageMethodsException("Bad web page invocation. Check the
URL parameters.");
You can either inherit from BasePage or use similar code to reject call
that do not result in PageMethods invocations.
You can get more information in the FAQ
(http://metasapiens.com/PageMethods/faq/). Look at the following
question: "I have this page with page methods, can I refer to it
without any parameter on the URL? Is the PageMethod parameter mandatory
in URLs?"
Fabrice