且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法识别的属性“targetFramework".请注意,属性名称区分大小写

更新时间:2023-01-18 23:05:27

当您在 web.config 中有 targetFramework="4.0" 属性但应​​用程序池设置为运行 ASP.NET 2.0.ASP.NET 2.0 完全无法识别 targetFramework 属性 - 因此将其更改为 2.0 不会产生预期效果.

This typically happens when you have an attribute of targetFramework="4.0" in the web.config but the App Pool is set to run ASP.NET 2.0. The targetFramework attribute is entirely unrecognized by ASP.NET 2.0 - so changing it to 2.0 won't have the desired effect.

联系支持人员/您的管理员并将 AppPool 切换到 4.0.

Contact Support / Your Administrator and have the AppPool switched to 4.0.

您也可以完全删除该属性,但是如果您的网站是使用 4.0 框架编码的,那么我肯定其他原因也会导致错误.

You could also remove the attribute entirely, however if your site was coded with the 4.0 Framework, then I'm sure something else will cause an error as well.