为什么会收到错误"无法识别的属性“targetFramework'"在IIS6? [英] Why am I getting the error "Unrecognized attribute 'targetFramework'" in iis6?

查看:142
本文介绍了为什么会收到错误"无法识别的属性“targetFramework'"在IIS6?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用。NET 4.0的MVC应用程序,并已与IIS 6就可以在服务器上安装它。我安装了.NET 4的服务器上,改变了ASP.Net版本4.0.xxx。

I have a MVC application using .Net 4.0 and have installed it on a server with IIS 6 on it. I installed .Net 4 on the server and changed the ASP.Net version to 4.0.xxx.

不幸的是,我仍然得到错误无法识别的属性targetFramework'。我在想什么?

Unfortunately, I am still getting the error "Unrecognized attribute 'targetFramework'". What am I missing?

推荐答案

我想通了这个问题。当我原本设置服务器与.net 2运行MVC,我不得不设置通配符路径指向在V2.0.50727目录Aspnet_isapi.dll文件。有一次,我切换到v4.0.30319它的工作。

I figured out the problem. When I had originally setup the server to run MVC with .Net 2, I had setup the wildcard path to point to the aspnet_isapi.dll file in the v2.0.50727 directory. Once I switched it to v4.0.30319 it worked.

您可以通过

  1. 开启IIS管理器
  2. 打开网站的属性
  3. 进入主页目录或虚拟目录标签
  4. 点击配置按钮
  5. 编辑通配符映射(下框)。如果没有一个通配符映射,添加一个。

该值应 C:\ WINDOWS \ microsoft.net \框架\ v4.0.30319 \ aspnet_isapi.dll的(取决于你安装了.NET 4的目录)

The value should be c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll (depending on the directory you installed .Net 4 to).

  • 作为一个方面说明,您可以更改网站属性中的ASP.Net选项卡下的ASP.Net版本。

这篇关于为什么会收到错误"无法识别的属性“targetFramework'"在IIS6?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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