1. Technology

ASP.NET Server Processing

How ASP.NET Server Processing turns your code into a web page.


Updated October 09, 2010

Hopefully, you reached this page from the About Visual Basic ASP.NET Hub Page. If not, you might want to click the link above and go there.

Although you don't really see it directly in your client side programming, the key to ASP.NET's performance is what happens on the server - a computer that is usually somewhere out there in the web that sends the HTML web page to the browser. (When you're developing your ASP.NET application, you will probably use the internal development server provided by VB.NET that runs right on your own computer.) Production systems run mostly run on Microsoft's IIS web server. You can use IIS on your own machine because it can be installed on all supported versions of Windows, but you may have to turn it on in Windows before you can actually use it with Control Panel > Turn Windows features on or off.

The actual flow of processing in an ASP.NET application can be confusing and it's critical to get it clearly in mind. A lot of the methods that you code depend on a complete understanding. Since most people already understand the concept of requesting a web page using a browser, lets start there.

In the beginning, servers simply sent a file to clients that a browser would turn into a viewable page. But things have become more complicated. Now, a request for an ASP.NET web page might look like:


... or ...


The first case is a the more traditional web forms model. The second is an MVC web page. Since MVC is a new concept in structuring programs, this page will concentrate on web forms. There are a lot of other ways the request can be structured, from ".asp" (classic ASP) to ".cgi" (common gateway interface). None of them are covered here because this is a site about ASP.NET.

Sending this request to the server is commonly called "posting back" to the server, or just "postback". When an IIS server sees the qualifier ".aspx", the server knows that it must pass the request to another system called the ASP.NET application server. (The actual name is ASPNET_ISAPI.dll.) This gives the programmer the complete set of tools in .NET to do whatever is necessary to return a rich, dynamic web page to the client. This is where your VB code comes in. For example, your code could get information from a database, check with a security subsystem, get information from a completely different system on a network that the server is part of - which could be "the Internet cloud", retrieve information about the user based on a profiling system in ASP.NET, or basically anything else that clever programmers can think up. In other words that ".aspx" qualifier opens up a whole world of possibilities. (MVC does too. It just gets there a different way.)

Eventually, however, ASP.NET has to return a standard HTML ... or XHTML ... web page back to the client. One of the amazing things that ASP.NET can do is to take care of the job of formatting whatever the result of the "back end" .NET processing was as HTML that any browser can display on your screen again. (So you, the programmer, don't have to do it.)

This whole cycle is commonly called "ASP.NET server processing". The cycle is shown in the illustration below:

Click Here to display the illustration

This entire cycle is usually called a "round trip" in programming. But just one round trip usually isn't the end of things. Because this is a dynamic ASP.NET web page, the server usually creates parts of the HTML response to the client so that when they're clicked, or changed ... or even just time out ... a new postback request is sent to the server which will create a new response. Which could create a new postback request, which might create a new response, and so on.

This is why it's called a "dynamic" web page.

  1. About.com
  2. Technology
  3. Visual Basic
  5. ASP.NET Server Processing

©2014 About.com. All rights reserved.