When you view an .aspx page in a Microsoft ASP.NET Web
application, you may experience the following symptoms:
A blank page may appear in the browser.
You may receive an instruction to download the .aspx
The typical behavior is that the server-side code for the .aspx
page is processed, and then the code is not sent to the Web browser in its raw
Symptoms that are exhibited when you use Visual Studio .NET to debug ASP.NET
When you debug an ASP.NET application in Microsoft Visual Studio
.NET, you may receive the following error message in the IDE:
Error while trying to run project: Unable to start
debugging on the Web server. The server does not support debugging of ASP.NET
or ATL Server applications. Run setup to install the Visual Studio .NET server
components. If setup has been run, verify that a valid URL has been specified.
You may also want to refer to the ASP.NET and ATL Server debugging
topic in the online documentation. Would you like to disable future attempts to
debug ASP.NET pages for this project?
After you install the Microsoft .NET Framework Software
Development Kit (SDK) or Microsoft Visual Studio .NET, Microsoft Internet
Information Services (IIS) mappings are created to associate new file name
extensions and new settings for ASP.NET.
The new settings are not in
place if either of the following statements applies to your situation:
IIS was not installed when you ran the .NET Framework SDK
or Visual Studio .NET Setup.
You removed and then reinstalled IIS after you ran the .NET
Framework SDK Setup or the Visual Studio .NET Setup.
Follow these steps to verify whether or not you see the issue
described in this article. This test checks for the typical symptoms that are
related to the issue. If you are already familiar with how IIS application
mappings work, you can also follow the steps in the "How To Verify Your IIS
Application Mappings" section of this article to verify the configuration of
your Web server.
To create an ASP.NET Web application, use Visual Studio
.NET. To do so, follow these steps:
Start Microsoft Visual Studio .NET.
On the File menu, point to New, and then click Project.
In the New Project dialog box, click either Visual C# Projects or Visual Basic Projects under Project Types, and then click ASP.NET Web Application under Templates.
In the Location box, replace the WebApplication# default name with MyWebApp. If you use the
local server, you can leave the server name as http://localhost. The resulting Location box appears as follows:
In Solution Explorer right-click the project node, point to
Add, and then click Add Web Form. Name the Web Form MappingsTest.aspx, and
then click Open.
Right-click the .aspx page in the editor, and then click View Code. Add the following code to the Page_Load event handler:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Response.Write("This code was executed")
On the File menu, click Save All to save the Web Form and other associated project files.
On the Build menu in the Visual Studio .NET IDE, click Build Solution.
Right-click the .aspx page, and then click View in Browser.
If the mappings are correct, the "This code was executed"
message appears in the browser. If the mappings are not correct, one of the
following behaviors occurs:
A blank page appears in the browser.
You receive a prompt to download the .aspx
This behavior occurs because server-side code is not
processed or executed in the expected manner. In either case you receive the
unprocessed source code. For the blank page scenario, if you right-click the
page in the browser and then click View Source, you notice that the server-side code appears in its unprocessed
form. For example, in a Visual C# ASP.NET Web Form, the @ Page directive appears similar to the following:
The resolution to repair IIS mappings for ASP.NET is
derived from Microsoft Knowledge Base article Q306005.
For more information, click the following article number to view the article in the Microsoft Knowledge Base: