HTTP module and HTTP handler
What are 开发者_如何学PythonHTTP module and HTTP handler and how do they work while page requesting? How do authentication and authorization processes work in ASP.NET?
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.
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)
精彩评论