You receive an error message when you try to view an ASP.NET Web application on a computer that has the .NET Framework 2.0 installed (909642)
The information in this article applies to:
- Microsoft .NET Framework 2.0
SYMPTOMSWhen you try to view a Microsoft ASP.NET Web application on a computer that has the Microsoft .NET Framework 2.0 installed, you may receive an error message that is similar to the following: Server Error in '/Staging' Application.
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'xmlns'.
Source Error:
Line 1: <?xml version="1.0"?> Line 2: <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> Line 3: <connectionStrings configSource="staging.config" /> Line 4: <system.web>
Source File: C:\MyProjects\MyCompany\CompanySite_deploy\Staging\web.config Line: 2
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 This issue may occur in the following scenarios: - Scenario 1
- You create an ASP.NET Web application in Microsoft Visual Studio 2005. You do not compile the application.
- You publish the Web application to a Web site that is hosted on Microsoft Internet Information Services (IIS).
- Scenario 2
- You compile an ASP.NET 2.0 Web application.
- You create a new virtual directory in IIS to host the Web application.
In either of these scenarios, you may receive an error message when you try to view the Web page in a browser. Note You may experience this issue even though the Web application does not use a Web.config file. If the Web application does not use a Web.config file, you may receive the following error message when the Web application calls a feature of the Microsoft .NET Framework 2.0: Parser Error CAUSEThis issue occurs if the application extensions for the IIS Web site are mapped to the Microsoft .NET Framework 1.1 or to the Microsoft .NET Framework 1.0. The .NET Framework 1.1 and the .NET Framework 1.0 cannot implement the configuration settings that are used by the .NET Framework 2.0.
Note When you install ASP.NET 2.0, the application extensions for a root Web site are not automatically mapped to the .NET Framework 2.0 in IIS. This behavior is intended to make sure that the existing applications that use the .NET Framework 1.1 or the .NET Framework 1.0 will continue to work as expected.RESOLUTIONTo resolve this issue, use one of the following methods. Method 1: Configure the Web site to use ASP.NET 2.0- Start Internet Information Services Manager.
- Expand the computer name that you want, and then expand Web Sites.
- Right-click the Web site that you want, and then click Properties.
- Click the ASP.NET tab, and then click 2.0.50727 in the ASP.NET version box.
Note If you have the .NET Framework 2.0 installed, and 2.0.50727 does not appear in the ASP.NET version box, go to the steps in the "If ASP.NET 2.0 is not installed" section. - Click OK.
If ASP.NET 2.0 is not installedIf you have the .NET Framework 2.0 installed, and 2.0.50727 does not appear in the ASP.NET version box as described in step 4 in the "Method 1: Configure the Web site to use ASP.NET 2.0" section, follow these steps. Note These steps will install and register ASP.NET 2.0. However, this procedure will not modify any scriptmaps. - Quit Internet Information Services Manager.
- Click Start, click Run, type cmd, and then click OK.
- At the command prompt, type the following:Note path is a placeholder for the folder where the .NET Framework 2.0 is installed.
- Follow the steps to configure the Web site to use ASP.NET 2.0.
Method 2: Map the application extension to the .NET Framework 2.0- Start Internet Information Services Manager.
- Expand the computer name that you want, and then expand Web Sites.
- Right-click the Web site that you want, and then click Properties.
- Click the Home Directory tab, and then click Configuration.
- Under Application extensions, click the application extension that you want, and then click Edit.
- In the Executable box, type the path of the Aspnet_isapi.dll file in the Microsoft .NET Framework 2.0 folder on your computer.
- Click OK three times.
MORE INFORMATIONThis issue occurs because the project system does not perform version checking when you publish an ASP.NET Web application to a new Web site. When you open an existing Web site or create a new Web site in Visual Studio 2005, this issue does not occur.
When you use ASP.NET in the .NET Framework 1.1 and in the .NET Framework 1.0, you cannot compile the application at runtime. ASP.NET 2.0 in the .NET Framework 2.0 provides the functionality to compile the application at runtime.
Note When you create a new Web site or open an existing Web site that is mapped to the .NET Framework 1.1, the project system verifies the version of the .NET Framework that the Web site uses.REFERENCESFor more information about the changes in ASP.NET in the .NET Framework 2.0, visit the following Microsoft Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 12/9/2005 |
---|
Keywords: | kberrmsg kbtshoot kbprb KB909642 kbAudDeveloper kbAudITPRO |
---|
|