Before hitting the application itself, is there a way to respond to requests, preferably based on URL, and return a response? Possibly a web.config server (IIS) configuration or a static page kinda like app_offline.
Essentially, this is my scenario: If I receive a request with a specific path (i.e. /hello), I want to straight away return a response and not enter the applicaton.
Is this possible? Is there a way to set a static page that is always served before .NET kicks in (auth, filters, middleware, etc.) kinda like app_offline?
I tried looking at ISAPI filters but it seems overly complex for what I want to do, especially considering our apps are deployed to Azure.
Is there some Azure feature we can leverage?
I suggest you could try to use httphandler to achieve your requirement. You could create a custom http handler which will fired before the web form.
Details about how to create a custom httphanlder, you could refer to below steps:
1.Create a custom class:
2.Add below settings into web.config
Result: