相关疑难解决方法(0)

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

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

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

<compilation debug="true" targetFramework="4.0">
Run Code Online (Sandbox Code Playgroud)

该网站在我的本地PC上工作正常但在我将其加载到主机并尝试在线查看时无法打开.

asp.net

407
推荐指数
10
解决办法
42万
查看次数

无法识别的属性'targetFramework'.在4.0站点与2.0子文件夹?

我最近将网站升级到.net 4.0.我更改了应用程序池,几乎一切都正常.

但是,由于某种原因,位于"admin"子文件夹中且具有自己的web.config的站点的管理部分仍然在2.0下运行.当我左键单击IIS中的子目录并检查属性的ASP.net选项卡时,它获得ASP.NET版本2.0.50727.

如果我单击"编辑配置",我会收到此错误"尝试读取配置时出现错误".错误消息是:

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

受保护的Web配置直接看起来像这样

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <authorization>
            <deny users="?"/>
        </authorization>
        <customErrors mode="Off"></customErrors>
    </system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)

当我尝试导航到管理部分时,我得到"服务器应用程序不可用",并且应用程序日志中的条目抱怨两个不同的版本.

一切都在4.0的同一个应用程序池下运行.为什么子文件夹不是4.0,我该如何解决?

iis .net-4.0

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net-4.0 ×1

asp.net ×1

iis ×1