다음을 통해 공유


Troubleshooting an ASP.NET Installation

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

There are a few problems that commonly occur with new ASP.NET installations:

  • You have installed ASP.NET and the .NET Framework on the server, but when you request a page from your application, nothing happens and the request does not resolve.

    You need to install and enable IIS on the server before you install the .NET Framework. Either you can uninstall the .NET Framework from the server, install IIS, then reinstall the .NET Framework, or you can install IIS, then use the ASP.NET IIS Registration tool (Aspnet_regiis.exe) to configure the script maps that IIS uses for ASP.NET file name extensions. For more information, see Uninstalling ASP.NET, Setting Application Mappings in IIS 6.0, and the "To repair IIS mappings for ASP.NET using Aspnet_regiis.exe" procedure later in this topic.

  • You have installed ASP.NET and the .NET Framework with IIS installed and enabled, then uninstalled and reinstalled IIS. When you request a page from your application, nothing happens and the request does not resolve.

    When you uninstalled and reinstalled IIS, the script maps that IIS uses for ASP.NET were broken. Use Aspnet_regiis.exe to configure the script maps that IIS uses for ASP.NET file name extensions. For more information, see the "To repair IIS mappings for ASP.NET using Aspnet_regiis.exe" procedure later in this topic.

  • You have installed and enabled IIS, installed ASP.NET and the .NET Framework, deployed your application, and requested a page, but you receive one of the following error messages:

    • Access denied to 'C:\Inetpub\Wwwroot' directory. Failed to start monitoring directory changes.

    • Server cannot access application directory 'C:\Inetpub\Wwwroot\ Virtual Directory Name \'. The directory does not exist or is not accessible because of security settings.

    The proper permissions have not been set for the Web site or virtual directory. ASP.NET requires read, execute, and list access for the ASPNET account (the Aspnet_wp.exe process account) on the root Web site or on any virtual directory. These settings are necessary so that ASP.NET can access the content files and can monitor file changes. To correct this problem, follow the steps in the following procedure.

Procedures

To add read, execute, and list permissions for the ASPNET account on the root Web site or on a virtual directory

  1. In Windows Explorer, browse to the folder that contains the root Web site (which is C:\Inetpub\Wwwroot by default) or the virtual directory.

  2. Right-click the folder and then click Properties.

  3. On the Security tab, click Add.

  4. Type ComputerName**\ASPNET** (for example, on a computer named Webdev, type Webdev\ASPNET) and then click OK.

  5. Allow the following permissions for the ASPNET account: Read & Execute, List Folder Contents, and Read.

  6. Click OK to close the Properties dialog box and to save the changes.

Note

You do not need to perform these steps if the Everyone group or the Users group has read access to the root Web site or virtual directory.

To repair IIS mappings for ASP.NET using Aspnet_regiis.exe

  1. From the Start menu, click Run.

  2. In the Open box in the Run dialog box, type cmd, and then click OK.

  3. At the command prompt in the new window, type the following line:

    "%systemroot%\Microsoft.NET\Framework\version\aspnet_regiis.exe" -i.

  4. In this path, version represents the version number of the .NET Framework installed on your server. You must replace this placeholder with the actual version number when you type the command.

    Note

    You must include the quotation marks in the command.

    For more information about Aspnet_regiis.exe, use repeat step 3 with -? as an argument, or see ASP.NET IIS Registration Tool (Aspnet_regiis.exe).

Also, on Windows Server 2003, if you have installed the .NET Framework and ASP.NET from a Web download or through Visual Studio .NET, you must enable ASP.NET manually from IIS Manager. For more information, see Installing ASP.NET.

Note

If you want to install ASP.NET on a domain controller, there are special steps you must take to make the installation work properly. For more information, see Knowledge Base article Q315158, ASP.NET Does Not Work with the Default ASPNET Account on a Domain Controller.