Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points of ASP.NET architecture and security mechanism

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the knowledge points of ASP.NET architecture and security mechanism". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the knowledge points of ASP.NET architecture and security mechanism"?

Overview of Http request processing flow

Thinking about "Why can you see Zhang Ziyang's personal space by typing www.tracefact.net in the address bar?" is similar to thinking "Why does the apple fall to the ground instead of floating to the sky?" For ordinary visitors, this is as natural as every day when the sun rises in the east and sets in the west; for many programmers, it is the responsibility of the system administrator or network administrator to think that it has nothing to do with them. After all, IIS is a component of Windows, not a part of ASP.NET. In fact, IIS and .net Framework have done a lot of behind-the-scenes work in the 1/10 seconds from the time you tapped the enter to the time the page appeared in front of you.

You may think it doesn't matter to understand how the behind-the-scenes work works. As a programmer, you just need to make sure that the program you develop runs efficiently. However, during the development process, you often find that you often need to use classes such as HttpContext. At this time, have you ever thought about the composition of these classes and how the entities of these classes are created? You might simply answer: HttpContext represents a context of the current request. But do you know how IIS, Framework, and ASP.NET work together to process each Http request, how to distinguish between different requests, and how data flows among IIS, Framework, and ASP.NET?

To answer these questions, you first need to understand how IIS handles page requests, which is the basis for understanding Form and Windows validation patterns.

When the Http request arrives at the server

When the server receives a Http request, IIS first needs to decide how to handle the request (NOTE: is it certain that the server handles an .htm page and an .aspx page differently). So what is the basis for IIS to deal with?-- according to the suffix of the file.

After the server obtains the suffix name of the requested page (NOTE: it can also be a file, such as jimmy.jpg), it then looks for an application on the server side that can handle such suffixes, if IIS cannot find an application that can handle such files, and the file is not protected on the server side (NOTE: a protected example is a file in App_Code An unprotected example is your js script), then IIS will return the file directly to the client.

Applications that can handle various suffixes are often referred to as ISAPI applications (NOTE:Internet Server Application Programe Interface, Internet server application programming interface). Although this ISAPI sounds elegant and "application", you can see if you take a closer look at its full name: it is really just an interface that acts as an agent, and its main job is to map the requested page (file) and the actual handler corresponding to the subsequent name.

1. HttpRuntime transfers the Http request to HttpApplication,HttpApplication on behalf of the Web application created by the programmer. HttpApplication creates HttpContext objects for this Http request, which contain many other objects about the request, mainly HttpRequest, HttpResponse, HttpSessionState, and so on. These objects can be accessed in the program through the Page class or the Context class.

two。 Next, the Http requests to pass some Module that can do something before performing some actual work.

3. In this step, you perform some of the actual operations, usually the business logic completed by the .aspx page.

4. Http requests to go back to Module again, where Module can do something after some work has been done.

NOTE: notice the words I marked in red, and then think about it: are there many pairs of events such as Inserting and Inserted in ASP.NET? In fact, what is described here is the behind-the-scenes principle of why ASP.NET can divide an Insert operation into two parts, and then intercept events separately.

At this point, I believe you have a deeper understanding of "what are the knowledge points of ASP.NET architecture and security mechanism?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report