且构网

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

为什么会收到错误"无法识别的属性“targetFramework'"在IIS6?

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

我想通了这个问题。当我原本设置服务器与.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版本。