Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 909642 - Last Review: December 3, 2007 - Revision: 1.2
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
On This Page
SYMPTOMS
When 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:
CAUSE
This 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.
RESOLUTION
To 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 installed
If 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:
path Aspnet_regiis -ir
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 INFORMATION
This 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.
REFERENCES
For more information about the changes in ASP.NET in the .NET Framework 2.0, visit the following Microsoft Developer Network (MSDN) Web site:
APPLIES TO
- Microsoft .NET Framework 2.0
| kberrmsg kbtshoot kbprb KB909642 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please