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 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:

Line 3:  
Line 4:    <system.web>
Line 5:      <compilation debug="false" targetFramework="4.0" />
Line 6:    </system.web>
Line 7:    <system.serviceModel>

Source File: C:\inetpub\wwwroot\EvalserviceSite\web.config    Line: 5


Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

 

发生上面问题的主要原因是当前vs工程使用的时.NET4.0的版本,而IIS上默认的该website的.Net Framework Version 是低于4.0的版本

 

打开 IIS: 自己电脑名字 -> Application Pools ->website名字->右键单击->选择“Basic setting...” -> “.Net Framework version”(选择 .Net Framework v4.0)->确定。

如果不起作用关掉IIS,重新打开一下

 

Open  IIS: "My computer name" -> Application Pools -> your website name(.Net Framework Version)->right click->Basic setting... -> .Net Framework version(select .Net Framework v4.0)->OK

如果想一劳永逸那就直接选择“Set Application Pool Default...”,在里面的 ”.Net Framework version“选择"v4.0",关闭IIS重新打开全部会设置为4.0版本的.NET Framework version。

相关文章:

  • 2021-10-19
  • 2021-09-28
  • 2021-05-12
  • 2021-10-03
  • 2022-01-29
  • 2021-10-06
  • 2021-10-30
猜你喜欢
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案