After the preliminary browsing all the code, we will roughly understand:
1, execute flow. How does the ASP.NET program do? The implementation of an ASP.NET application is first to require a host. By establishing a host, the ability to execute the ASP.NET application code is established. Execute an ASP.NET request, you need to use httpruntime.processRequest (SimpleWorkerRequest) to execute, and SimpleWorkerRequest needs to be overloaded, instantiate a complete HTTP Request, and supplied to the ASP.NET running to correctly handle the user request context And the user requests data. SIMPLEWORKERREQUEST is overwritten in the execution of the ASP.NET, in accordance with the specification of the HTTP protocol, in accordance with the HTTP protocol.
2, the HTTP protocol details. We actually did not see the full HTTP Server's execution details, because the specific HTTP request is executed as the ASP.NET runtime (via httpruntime.processRequest), including .htm, files, are executed However, only the runtime finds that you don't need to execute it directly to read the file. This is not the same as the ASP.NET under IIS, IIS will handle the extension file requests you registered before ASP_WP.EXE. This result may be the same, but substantial is different, that is, the ordinary file processing location is different. So, we can deal with the self-processing part of Cassini belong to files that do not require dynamic parsing, reduce the burden on the ASP.NET runtime, and improve efficiency.
Cassini is an ASP.NET host program that is not a complete web server.
3, ASP.NET is a new execution environment, not scripting before the script,. In addition to the basic framework, .NET itself provides the ability and corresponding components of the ASPX page. Learning Cassini is how to learn how to use the .NET framework. Similar to you study C code learning with Windows API programming.
4, we can choose IIS as a host, but ISAPI starts the ASP.NET daemon after passing the response through the pipeline, and the IIS itself is also a basket of vulnerabilities, and there is no other need, we think it is still Implement ASP.NET hosts and perform ASP.NET applications are high efficient, and the application domain also provides secure isolation.
5. Learn how to use multithreading to meet multithreaded enterprise applications, the use of callback functions is also delicate.
6. It is meaningful for the development of Web applications independent of IIS in the future, for example, can develop desktop assist applications using ASP.NET development. Similar to the HTMLVIEW application. I see someone to quickly generate the ASP.NET to quickly generate the interface to run desktop applications (convenient to expand quickly to multiple users).
Of course, I also have questions yourself:
1. Why use ThreadPool, will it cause concurrent access to block?
2, can you use yourself to create a separate ASP.NET to execute a host?
3, how to generate such a tool more commonly, I believe it can be more independent.
Welcome to my myjobsdk@yahoo.com.cn
.