无法识别的属性“targetFramework".请注意,属性名称区分大小写 [英] Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

查看:31
本文介绍了无法识别的属性“targetFramework".请注意,属性名称区分大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载我的网站,但收到此错误消息:

I'm trying to up load my site and I'm getting this error message:

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

Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

<compilation debug="true" targetFramework="4.0">

该站点在我的本地 PC 上运行良好,但当我将其加载到主机并尝试在线查看时无法打开.

The site works fine on my local PC but won't open when I loaded it to my host and tried to view it online.

推荐答案

当您在 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.

这篇关于无法识别的属性“targetFramework".请注意,属性名称区分大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆