IIS7/Win7 .Net 4.0 中 ASP.Net 网站的运行时问题

发布于 2024-09-12 17:11:01 字数 628 浏览 2 评论 0原文

在VS2010中该项目的目标框架是4.0。 在IIS7中,localhost的.Net版本是4.0。 但对于我的应用程序的应用程序池,没有 4.0 框架可供选择。 在部署站点并浏览其中的文件后,我收到此错误:

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

Source Error:

Line 14: 
Line 15:   <system.web>
Line 16:     <compilation debug="true" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="Forms">


Source File: C:\inetpub\wwwroot\TestApp\web.config    Line: 16

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

请帮助我。

谢谢 雷迪

In VS2010 the project's target framework is 4.0.
In IIS7, localhost's .Net version is 4.0.
But for my application's App Pool, there's no 4.0 framework available to choose from.
And after I deploy the site and browse a file from it, I get this error:

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

Source Error:

Line 14: 
Line 15:   <system.web>
Line 16:     <compilation debug="true" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="Forms">


Source File: C:\inetpub\wwwroot\TestApp\web.config    Line: 16

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 

Please help me out.

Thanks
Reddy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

帅冕 2024-09-19 17:11:01

您应该在服务器上安装 .net 4 运行时。
如果您已经运行了 aspnet_regiis.exe

You should install the .net 4 runtime on your server.
if you already did run aspnet_regiis.exe

疑心病 2024-09-19 17:11:01

您需要在服务器上安装.Net 4.0。安装后,您将能够将应用程序池设置为使用 .Net 4.0 框架。

错误消息显示它正在尝试使用 .Net 2.0 运行您的应用程序,该应用程序无法处理您的 web.config 文件。

You need to install .Net 4.0 on the server. Once that is installed, you'll be able to set the app pool to use the .Net 4.0 framework.

The error message shows that it is trying to run your app using .Net 2.0 which can't process your web.config file.

毁虫ゝ 2024-09-19 17:11:01

如果.Net 4.0可用,请转到服务器IIS管理器并选择“应用程序池”并将.Net框架设置为您网站的4.0。

If .Net 4.0 is available please go to Server IIS Manager and select "Application Pool" and make the .Net framework as 4.0 for your website.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文