简体   繁体   English

Parallels Plesk + IIS7 asp.net 4.0错误:无法识别的属性“ targetFramework”

[英]Parallels Plesk + IIS7 asp.net 4.0 error: Unrecognized attribute 'targetFramework'

I'm using a godaddy VPS with parallels plesk. 我正在使用带有并行plesk的godaddy VPS。 Since my application is asp.net 4.0 I get the error: 由于我的应用程序是asp.net 4.0,因此出现错误:

"Unrecognized attribute 'targetFramework'

I realize it's because the application pools are set to asp.net 2.0, which I can't change in plesk, so I remote connect to my server, open IIS7, go into my application pools and set all of them to asp.net 4.0, but then I get this detailed error: (caused by changing plesk(default)(2.0)(pool) to 4.0) 我意识到这是因为应用程序池设置为asp.net 2.0,我无法在plesk中对其进行更改,所以我远程连接到服务器,打开IIS7,进入我的应用程序池并将它们全部设置为asp.net 4.0 ,但随后出现此详细错误:(由将plesk(default)(2.0)(pool)更改为4.0引起)

HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by
the static file handler.

Most Likely Causes:

•The request matched a wildcard mime map. The request is mapped to the
static file handler. If there were different pre-conditions, the
request will map to a different handler.

How can I get my asp.net 4.0 web application to run properly? 如何使asp.net 4.0 Web应用程序正常运行? There must be a decent way to get my asp.net application to run with parallels plesk. 必须有一种不错的方法来使我的asp.net应用程序在并行plesk下运行。 Any help would be greatly appreciated. 任何帮助将不胜感激。

Getting the following error when you deploy your first asp.net 4.0 website: 部署第一个asp.net 4.0网站时出现以下错误:

Unrecognized attribute 'targetFramework'. 无法识别的属性“ targetFramework”。 Note that attribute names are case-sensitive. 请注意,属性名称区分大小写。

is most likely because of either of 2 reasons: 1. You installed the .net 4.0 bits after IIS was set up, resulting in the wrong version of the .NET framework beeing registered with IIS. 可能是由于以下两个原因之一:1.在设置IIS之后安装了.net 4.0位,导致在IIS中注册的.NET Framework版本错误。

Most often the above results in conflicting versions of the framework, and so the easiest way of solving this is to re-register the .NET extensions with IIS using the aspnet_regiss tool. 上面的情况通常会导致框架版本冲突,因此解决此问题的最简单方法是使用aspnet_regiss工具使用IIS重新注册.NET扩展。 Make sure you run it from an elevated command prompt and that you use the correct version (in the v4.xx folder that is, not the v2.xx one). 确保从提升的命令提示符下运行它,并使用正确的版本(在v4.xx文件夹中,而不是v2.xx文件夹中)。 On my dev machine this tool is located in: 在我的开发机上,此工具位于:

C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319 C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319

and you run it with the -iru flags like so: 然后使用-iru标志运行它,如下所示:

aspnet_regiis.exe -iru 2. You haven't set the framework of the IIS application to the correct version of .NET (4.0 that is) aspnet_regiis.exe -iru 2.您尚未将IIS应用程序的框架设置为正确的.NET版本(即4.0)。

Change this using either the IIS Manager or the command line. 使用IIS管理器或命令行更改此设置。 In IIS Manager you select 'Application Pools', click the Application you've pointed you site to use, select 'Basic Settings' in the 'Actions' pane and change the '.NET framework version'. 在IIS管理器中,选择“应用程序池”,单击指向站点要使用的应用程序,在“操作”窗格中选择“基本设置”,然后更改“ .NET框架版本”。

This post over at MSDN should also be of great help. MSDN上的这篇帖子也应该有很大帮助。 Gotta love Microsoft's documentation! 一定喜欢Microsoft的文档!

http://msdn.microsoft.com/en-us/library/dd483478(VS.100).aspx http://msdn.microsoft.com/zh-CN/library/dd483478(VS.100).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM