What is the difference between HTTPMODULES and HTTPHANDLERS??

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)

Summary

If you need to create a request handler, for example you may want your own code to handle all .jpg image file requests like: http://Test.com/filename.jpg, then you need to use HttpHandlers for this purpose. If you want to modify a certain request, like you may want to perform some custom logic behind the scenes whenever user requests pages like Test.com/default.aspx, you need to use HttpModules. You can create multiple HttpModules to filter any request.