在XP上配置aspx时,出现这样的问题,该怎么办

在XP上配置aspx时,出现这样的问题,该怎么办

Parser Error Message: Unrecognized attribute 'xmlns'.
Source Error:

Line 1: <?xml version="1.0" encoding="UTF-8"?>
Line 2:
Line 3:
Line 4:

Source File: c:\inetpub\wwwroot\web.config Line: 2

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

在XP上配置aspx时,出现这样的问题,该怎么办
Server Error in '/' 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" encoding="UTF-8"?>
Line 2:
Line 3:
Line 4:

Source File: c:\inetpub\wwwroot\web.config Line: 2

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Server Error in '/' 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" encoding="UTF-8"?>
Line 2:
Line 3:
Line 4:

Source File: c:\inetpub\wwwroot\web.config Line: 2


Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

记事本打开web.config,另存为看下你web.config的存储编码是不是utf-8的,如果不是选择utf-8保存试试

I had this problem.  When I realized that my virtual directory was set up for v1.1 of the .Net framework, the solution was simple:  go to the properties page for the application in IIS, pick the "Asp.net" tab, and change the target framework to 2.0.

Edit:

I got the solution:

  1. right click and view properties of your website in IIS.
  2. select the asp.net tab
  3. select the correct .NET version in the 'ASP .NET Version' dropdown

If the "ASP.Net" tab didn't show in IIS property page. We need to go to windows\microsoft.net\framework\v2.xxx\, run aspnet_iisreg -r to register all. This will ensure the ASPNet replace the old.

run

aspnet_regiis -i

under the VS.NET command console or from the

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Hope helps. Thanks,

it shows that current version of asp.net you used is 1.0, and you need to change to 2.0 or higher version. if you can not find that in iis manager, you should register asp.net 2.0 first.