| Answer: |
In order to serve ASP.NET Web pages from your computer, you must be running Windows 2000, Windows XP Home or Pro, or Windows 2003 Server. You must have installed the Microsoft .NET Framework. Furthermore, you must have a Web server installed, such as IIS, or Microsoft's free developer-grade Cassini Web server.
Depending on how you installed all the needed components, you may still find that you cannot serve ASP.NET Web pages from your computers Web server. For example, you may create an ASP.NET Web page named Test.aspx with the following content:
<asp:Label runat="Server" Text="Hello, World!" />
|
But when you visit the Web page at http://localhost/Test.aspx, you see nothing in your browser. Doing a View/Source, you see:
<asp:Label runat="Server" Text="Hello, World!" />
|
Clearly the ASP.NET Web control has not been rendered. What gives?
Chance are, you installed the .NET Framework first, and then installed a Web server, like IIS. This causes problems for the following reason: when you install IIS, it does not automatically associate the ASP.NET extensions (.aspx, asmx, .asax, etc.) with the ASP.NET engine. Therefore, it does not properly render ASP.NET Web pages. If, however, you had installed the Web server first, and then the .NET Framework, part of the .NET Framework install would have automatically made these associations for you.
Fear not, though, if you installed the Web server after installing the .NET Framework. You can fix this problem by simply registering the ASP.NET extensions in IIS. This can be accomplished by running the aspnet_regiis.exe program, available in the WINNT\Microsoft.NET\Framework\v1.0.3705 directory. Specifically, run the program as:
(The -i option installs the needed associations in IIS.)
For a more thorough explanation of the aspnet_regiis.exe program, check out: ASP.NET IIS Registration Tool. Also, be sure to check out Troubleshooting an ASP.NET Installation.
Happy Programming! |