Overview:
Most. NET programmers are familiar with what happens when a browser sends a request to the IIS server. Today, I'm going to use WF+WCF to simulate the entire process. Of course there is only simulation, and the actual or there is a gap, if the description of the problem, please point out. The main purpose is to explain: the process of vision to see ASP.net request processing process, you will find it is not difficult. OK, or as usual, first look at the effect, said how to achieve, the final summary, with code download.
For a request from the client, I summarized the processing of IIS into two processes
1. Create ASP.net environment (if this is the first request)
2, the use of MHPM processing requests (M:httpmodule, H:httphandler, P:asp.net Page, M:httpmodule)
The prototype of the simulation is that there is a button on an ASPX page, click the button to request the IIS service
The reality of the simulation is that there is a button on a WPF form that clicks the button to invoke a service-side WCF service that contains a WF process that simulates the asp.net lifecycle, and the WCF service returns the steps to MHPM processing the request.
1. Create a text file on the server side to simulate IIS creating a asp.net environment.
2. Use a sequential workflow to simulate MHPM event processing requests and return the processing steps to the client. Originally want to return a paragraph of HTML script, intend to perfect later.
Effect:
1, simulated processing results: On the WPF page output processing steps.
2. Create an asp.net hosting environment on server-side simulation IIS: Simulate to write the steps that are created in a text file.