2

What are HTTP module and HTTP handler and how do they work while page requesting? How do authentication and authorization processes work in ASP.NET?

2 Answers 2

2

Authentication and authorization are events on your Http Pipeline. You can hook on to these modules and do some custom authentication/authorization by making config changes and implementing IHttpModule interface

from msdn:

An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application

So when IIS receives a request for ".aspx" file, it would tell the aspnet process to handle it. You can configure your own handlers and tell how to handle requests by implementing IHttpHandler interface.

Here is a good low level explanation from Rikh Strahl. Look at this diagram, you can understand them better.

google search can give you a lot of results, but you learn by implementing it :). here is an example. Happy coding.

Sign up to request clarification or add additional context in comments.

Comments

0

HTTP handlers are the end point objects in ASP.NET pipeline and an HTTP Handler essentially processes the request and produces the response. For example an ASP.NET Page is an HTTP Handler.

HTTP Modules are objects which also participate the pipeline but they work before and after the HTTP Handler does its job, and produce additional services within the pipeline (for example associating session within a request before HTTP handler executes, and saving the session state after HTTP handler has done its job, is basically done by an HTTP module, SessionStateModule)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.