How Web Server Execute ASP.NET Files?
When a site visitor requests a Web page address, the browser contacts the Web-server specified in the address URL and makes a request for the page by formulating an HTTP request, which is sent to the Web server. The Web server on receiving the request determines the file type requested and passes processing to the appropriate handler.ASP.NET files are compiled, if necessary, into .NET Page classes and then executed, with the results sent to the client’s browser. Here, Compilation means that on first load ASP.NET applications take longer to display than previous versions of ASP.
ASP.NET applications are a mixture of client-side markup and code and server-side processing. When an ASP.NET Web-form page is downloaded to the visitor’s Web browser, additional code is included in previous ASP versions. This extra code enables richer form functionality, including server and client-side events, validation, and the ability to maintain form value state. The server determines the visitor’s browser type and sends markup to match the browser’s abilities.
As form responses are received, the form values are maintained in a new facility of ASP.NET “State Bags” and are compressed into a hidden form element containing the page “Viewstate.”This allows the form elements that the visitor has interacted with to maintain the same values as when the page was submitted.
When the server receives this request, it will find the page that was requested using the path information specified, and the relevant system will process the page. In the case of Classic ASP, there was not much to this process, although a certain amount of caching happened.
The server will process the ASP.NET page using a special
.dll especially for ASP.NET. As with previous versions of ASP, It has a large collection of objects that deal with processing certain functions such as – HTTP request, databases, the file system, and forming the response. When the response is complete, it is flushed back out to the user’s browser, usually as HTML.