Get the App
SLTechnology News&Howtos  ›  Development  › 

How to analyze ASP.NET Application Program

Shulou Source: shulou.com Published: 2022-06-02 22:30:03 10月15日 Update

This article shows you how to analyze ASP.NET applications, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.

Default HttpModule in ASP.NET systems:

Default Authentication Module ensures that the Authentication object exists in the context. Cannot inherit this class.

FileAuthorizationModule verifies that the remote user has NT access to the requested file. Cannot inherit this class.

Forms Authentication Module enables the ASP.NET application to use Forms authentication. Cannot inherit this class.

Passport Authentication Module provides wrapper around Passport Authentication services. Cannot inherit this class.

SessionStateModule provides session state services for ASP.NET applications.

UrlAuthorizationModule provides URL-based authorization services to allow or deny access to specified resources. Cannot inherit this class.

Windows Authentication Module enables the ASP.NET application to use Windows/IIS authentication. Cannot inherit this class

The default HttpModule of these systems is configured in the file machine.config, and the relationship with the web.config we used when developing is: when ASP.NET FRAMEWORK starts to process a Http Request, it will load the web.config file of the machine.config and the directory where the request page is located. If you configure your own HttpModule in the machine, you can still remove this mapping relationship in the web.config file of the page.

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 ("

HelloWorldModule:BeginningofRequestfont > H2 > ")

}

PrivatevoidApplication_EndRequest (Objectsource,EventArgse)

{

HttpApplicationapplication= (HttpApplication) source

HttpContextcontext=application.Context

Context.Response.Write ("

HelloWorldModule:EndofRequestfont > H2 > ")

}

PublicvoidDispose ()

{

}

}

HttpModules >

System.web >

The above content is how to analyze ASP.NET applications. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Application program application file service authentication content location skill knowledge system identity page configuration concise concise context object Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Shulou Information Huawei Xiaomi