What Is ASP.NETby Wei-Meng Lee, author of ASP.NET: A Developer's Notebook
- ASP.NET (Active Server Pages .NET) is a web development technology from Microsoft. Part of the .NET Framework, ASP.NET allows developers to build dynamic web applications and web services using compiled languages like VB.NET and C#. Using Visual Studio, the development tool from Microsoft, web developers can develop very compelling applications using ASP.NET, with the ease of drag-and-drop server controls. Currently in its next major release, ASP.NET 2.0 is slated to be released in November 2005.
In This Article:
- A Brief History of ASP.NET
- How ASP.NET Works
- What Do You Need to Run ASP.NET?
- Visual Studio and ASP.NET
- ASP.NET Improvements
- New Features in ASP.NET 2.0
In the early days of the Web, the contents of web pages were largely static. Pages needed to be constantly, and manually, modified. To create websites that were dynamic and would update automatically, a number of server-side technologies sprouted up, including Microsoft's Active Server Pages (ASP). ASP executed on the server side, with its output sent to the user's web browser, thus allowing the server to generate dynamic web pages based on the actions of the user.
These server-side technologies are important contributions to the development of the Web. Without them, web applications that we've become accustomed to today, such as Amazon.com, eBay.com, and so on, would not be possible. In this article, I will delve into ASP.NET, with a look at what it is, how it works, and the newest important features of 2.0.
Microsoft Active Server Pages (ASP) started its life as a public beta (v1.0) in October 1996 as an upgrade to Internet Information Server (IIS) 2.0. From that point on, ASP slowly evolved into version 2.x, and then finally 3.0. In the initial three versions, ASP used a scripting language, VBScript, as the default language. Using a scripting language has its flaws; code is interpreted rather than compiled, and using VBScript as the default language turned some people off (though technically you can configure ASP to use other languages such as JScript and Perl, but this was not commonly done). This interpreted code model of ASP seriously limited performance.
In early 2000, Microsoft introduced the new .NET Framework, and together with it, introduced the upgrade of ASP: ASP.NET 1.0 (previously known as ASP+). Over the last few years, ASP.NET has gone through a few evolutions, from ASP.NET 1.0 to 1.1, and now to ASP.NET 2.0, due to be released at the end of this year (November 2005).
In ASP.NET, you are not limited to scripting languages. You can now use the following .NET languages:
When a web browser requests a page from a web server, the web server (IIS) will first check if the request is for an HTML page. If it is, the request is fulfilled by fetching the files from the OS and then returning it to the client (web browser). If the client is requesting an ASP.NET page, IIS will pass the request to the ASP.NET runtime, which will then process the application and return the output to the client.
ASP.NET pages use the .aspx extension. This is to ensure that ASP.NET is able to run side by side with classic ASP on the same server, which uses the extension .asp.
One of the inherent problems with the HTTP protocol is its stateless nature. Put simply, a request made by a user is loaded into memory, fulfilled, and then unloaded. Subsequent requests by the same user are treated just like any request; the server makes no attempt to remember what the user has previously requested. This stateless nature makes writing web applications a challenge, because the application developer must explicitly devise mechanisms to enable the server to remember the previous state of the application. Several mechanisms have been devised over the years, such as cookies and the use of query strings for passing information to and from the server and the client.
In classic ASP, you typically need to write pages of code in order to preserve the state of the page after the user has posted a value back to the server. In ASP.NET, all of these mundane tasks (collectively known as state management) are accomplished by the ASP.NET runtime. You will learn more on this in the following sections.