无法识别的属性“targetframework” [英] unrecognized attribute 'targetframework'

查看:1339
本文介绍了无法识别的属性“targetframework”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/7530725/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-sen">Unrecognized属性targetFramework。需要注意的是属性名称是区分大小写的

首先,让我说,我知道,这个问题已经被问了几次关于这个站点 - 但答案对所有这些不解决我的问题。

Firstly, let me say that I'm aware that this question has been asked a few times on this site - but the answers to all of these don't resolve my issue.

我看到了下面的问题,当我尝试添加一个新的托管处理程序在IIS7:

I'm seeing the following issue when I try to add a new managed handler in IIS7:

无法识别的属性targetFramework。请注意,属性名   是区分大小写的。

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

环境是Windows服务器企业2008 SP1安装IIS7。

The environment is Windows Server Enterprise 2008 SP1 with IIS7 installed.

我的应用程序是使用.NET 4.0。在.NET框架IIS之后安装的:

My application is using .NET 4.0. The .NET framework was installed after IIS:

我试过/检查以下内容:

I've tried/checked the following:

    我的应用程序池使用.NET 4.0
  • (我已经安装了.NET 4.0的一个版本,没有测试的等等。)
  • 有保证的.NET 4.0中正确地与IIS使用ASPNET_REGIIS.EXE -iru注册。
  • 回收应用程序池,重新启动机器。
  • 完全卸载.NET 4.0,然后重新安装它。
  • 删除了targetFramework属性 - 这恰恰会导致其他地方崩溃
  • My app pool is using .NET 4.0 (I have one version of .NET 4.0 installed, no beta's etc.)
  • Ensured .NET 4.0 is registered correctly with IIS using 'aspnet_regiis.exe -iru'.
  • Recycled the app pool, rebooted the machine.
  • Completely uninstalled .NET 4.0, then re-installed it.
  • Removed the 'targetFramework' attribute - this just causes a crash elsewhere.

要我来说,它看起来像IIS仍引用.NET的previous版本不知何故,即使我在IIS应用程序池告诉我,他们使用的是.NET 4.0。

To me it looks like IIS is still referencing a previous version of .NET somehow, even though my app pools in IIS tell me they are using .NET 4.0.

我的网站加载罚款,但我不能设置我的自定义图像处理程序,由于这个问题。

My website loads fine, but I can't setup my custom image handler due to this issue.

我会非常AP preciate任何意见。

I'd greatly appreciate any advice.

感谢。

更新

这是疯了..我已经完全被环境从头开始重建:

This is crazy.. I've completely rebuilt by environment from scratch:

  • 在下载Windows服务器企业不超V SP1从MSDN。
  • 在安装.NET 4.0
  • 在安装ASP.NET MVC 3
  • 添加Web服务器角色 - 确保应用程序池使用.NET 4.0
  • 在部署我的项目

当我尝试添加自定义hanlder映射发生同样的错误。我现在不是做一些不正确/完全傻还是有一些问题,IIS7在此设置。 IIS不会从.NET 4.0承认targetFramework属性,即使我的应用程序池设置为使用.NET 4.0。

The same error occurs when I try to add a custom hanlder mapping. I'm either doing something incorrectly / completely stupid or there is some issue with IIS7 in this setup. IIS doesn't recognise the 'targetFramework' attribute from .NET 4.0, even though my app pool is set to use .NET 4.0.

如果我使用命令'ASPNET_REGIIS -lv,它告诉我,只有.NET 4中注册了IIS。

If I use the command 'aspnet_regiis -lv', it tells me that only .NET 4 is registered with IIS.

推荐答案

注册与IIS的框架是什么工作对我来说:

Registering the framework with IIS is what worked for me:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i

这篇关于无法识别的属性“targetframework”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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