2013-07-07 77 views
6

我尝试从我的VS2012发布Web应用程序到远程计算机。 我发表的文件,但是当我尝试打开该网站,我得到这个错误:无法识别的属性'targetFramework'。注意>属性名称区分大小写

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

Line 41: 
Line 42:  <compilation targetFramework="4.0" /> 
Line 43:  <httpRuntime targetFramework="4.0" /> 
Line 44:  <authentication mode="Forms"> 
Line 45:  <forms loginUrl="~/" timeout="2880" /> 

(43行是红色)

在远程计算机上: * IIS7 (也是IIS6,我认为) * ASP.NET 4.0安装 *“aspnet_regiis -ir”>安装成功 * IIS7>应用程序池> ASP.NET 4.0> poining to“.NET Framework v4.0.30319” * IIS7>我的web应用程序>“ASP.NET 4.0”(集成)被选中。 我不知道它是否重要,但服务器的窗口是Widows Server 2008 RT Enterprise 64位,而我的电脑是Windows 7 32位。

没有什么帮助...

enter image description here enter image description here

+0

您确定选择了4.0吗?当网站设置为使用ASP.NET 2.0时,我得到了这个错误... –

+0

您能为应用程序发布所选应用程序池的屏幕截图吗?您遇到的错误确实意味着ASP.NET 2.0正在尝试运行您的应用程序。请参阅[此规范文章](http://stackoverflow.com/questions/7530725/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-sen) – sq33G

+0

我编辑了问题,并添加了2个屏幕截图.. 。 – TamarG

回答

7

httpRuntime没有可供集targetFramework,删除它,它会工作。

+0

我得到了一个不同的错误 - “无法从程序集'mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'加载类型'System.Runtime.CompilerServices.ExtensionAttribute'。” – TamarG

+0

@TamarG这是你的真实错误,将其删除并解决下一个错误。 – Aristos

+1

@TamarG下一个错误看看:http://stackoverflow.com/questions/10896894/webapi-rc-system-runtime-compilerservices-extensionattribute-from-assembly-ms – Aristos

相关问题