The default HttpModule in ASP. NET:
The Default Authentication Module ensures that the Authentication object exists in the context. This class cannot be inherited.
FileAuthorizationModule verifies that the remote user has the NT permission to access the requested file. This class cannot be inherited.
Forms Authentication Module enables ASP. NET Applications to use Forms Authentication. This class cannot be inherited.
The Passport Authentication Module provides a wrap-around, Passport Authentication service. This class cannot be inherited.
SessionStateModule provides session status services for ASP. NET applications.
UrlAuthorizationModule provides URL-based authorization services to allow or deny access to specified resources. This class cannot be inherited.
Windows Authentication Module enables ASP. NET Applications to use Windows/IIS Authentication. Unable to inherit this class
The default HttpModule of these systems is in the file machine. the configuration in config and the web. the config relationship is in ASP. when the net framework starts to process an Http Request, it will load the machine in sequence. the web. config file. If an HttpModule is configured in the machine, you can still. remove the ing from the config file.
- publicclassHelloWorldModule:IHttpModule
- {
- publicHelloWorldModule()
- {
- }
-
- publicStringModuleName
- {
- get{return"HelloWorldModule";}
- }
-
- //IntheInitfunction,registerforHttpApplication
- //eventsbyaddingyourhandlers.
- publicvoidInit(HttpApplicationapplication)
- {
- application.BeginRequest+=
- (newEventHandler(this.Application_BeginRequest));
- application.EndRequest+=
- (newEventHandler(this.Application_EndRequest));
- }
-
- privatevoidApplication_BeginRequest(Objectsource,
- EventArgse)
- {
- //CreateHttpApplicationandHttpContextobjectstoaccess
- //requestandresponseproperties.
- HttpApplicationapplication=(HttpApplication)source;
- HttpContextcontext=application.Context;
- context.Response.Write("<h1><fontcolorfontcolor=red>
HelloWorldModule:BeginningofRequest font> h1><hr>");
- }
-
- privatevoidApplication_EndRequest(Objectsource,EventArgse)
- {
- HttpApplicationapplication=(HttpApplication)source;
- HttpContextcontext=application.Context;
- context.Response.Write("<hr><h1><fontcolorfontcolor=red>
HelloWorldModule:EndofRequest font> h1>");
- }
-
- publicvoidDispose()
- {
- }
- }
- <system.web>
- <httpModules>
- <addnameaddname="HelloWorldModule"type="HelloWorldModule"/>
- httpModules>
- system.web>
- Introduction to ASP. net mvc implementation
- How to send emails from ASP. NET 2.0
- Introduction to ASP. NET Applications
- ViewState nature in ASP. NET
- Installing ASP. NET AJAX