I’m looking for a way to bypass all ASP.NET-specific behaviour, and work in a IIS/azure server like I would on most other servers (receive the request string, write the response). I understand this is not a common desire in ASP.NET, but this would be great to port some external code to work on ASP.NET.
So, basically I’m looking for a way that will:
- For each request that is not to a physical file, call my handler
- This handler will receive the raw HTTP request (it’s ok for an abstraction of it, given that I have the same information)
- The web server logic will process the request and write the response (again, it’s OK for an abstraction, given that I can write the same kind of information, like HTTP status and HTTP headers)
What’s the best way to achieve this?
Thank you!
You could write yourself a custom HTTP Module and register it with IIS. http://msdn.microsoft.com/en-us/library/ms227673.aspx