ASP.NET: overriding IIS response to expect 100 header?

I have an ASP.NET application that receives requests from client software, and the request headers contain a "100-continue request."

I want to override the auto-response from IIS to the request-100 header so that I can use other headers to authenticate the user (or not) and send the correct answer depending on the state (100 to continue for authentication explicitly) or the correct error message.

+3
source share
1 answer

How we did this, and I believe the general approach is to create an HTTP module. Modules are called with every request that is attached to your application, as part of the request pipeline, and have access to resources throughout the request. You can check each request and take actions, such as performing authentication and changing headers based on the request. They also allow you to examine the outgoing response and modify it.

Notes http://msdn.microsoft.com/en-us/library/bb398986.aspx is an excellent resource if you are new to modules.

Hope this helps!

+2
source

Source: https://habr.com/ru/post/1723579/


All Articles