IIS 管理器无法在 .NET 4 应用程序上配置 .NET 编译

发布于 2024-09-19 18:10:23 字数 474 浏览 6 评论 0原文

我尝试在 IIS 管理器中配置 .NET 编译设置,但我看到的只是一条错误消息,告诉我 C:\ 中的 web.config 文件中有一个无法识别的元素windows\Microsoft.NET\Framework64\v.4.0.30319\config\

对我来说有点奇怪的是,我在 Windows 7 系统和 Windows Server 2008 R2 上收到此错误消息。

在谷歌上搜索了一下,我发现的是这个博客条目 http://olegtarasov.me/2010/09/nastrojka-iis-7-5-i-asp-net-4/。 我尝试了 aspnet_regiis -i -enable 命令,但这不是我的解决方案。

i tried to configure the .NET Compilation Settings in the IIS Manager but all i see is an Error Message that tells me that there is an unrecognized element in the web.config file in C:\windows\Microsoft.NET\Framework64\v.4.0.30319\config\.

A little bit strange for me is, that i get this error message on my Windows 7 System and also on a Windows Server 2008 R2.

While googling around a little bit all i found is this blog entry http://olegtarasov.me/2010/09/nastrojka-iis-7-5-i-asp-net-4/.
I tried the aspnet_regiis -i -enable command but that was not the solution for me.

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

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

发布评论

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

评论(4

吹泡泡o 2024-09-26 18:10:23

好的,我知道了。

问题是,我的系统是 64 位系统,而我调用的 aspnet_regiis 是 32 位版本。从 Framework64 目录调用 aspnet_regiis 后,一切正常。

感谢斯科特·汉塞尔曼 http://www.hanselman.com/blog/ASPNET4BreakingChangesAndStuffToBeAwareOf.aspx

Ok, i've got it.

The Problem is, that my systems a 64 Bit systems and the aspnet_regiis i've called was the 32 Bit Version. After calling aspnet_regiis from the Framework64 Directory everything was fine.

Thanks to Scott Hanselman http://www.hanselman.com/blog/ASPNET4BreakingChangesAndStuffToBeAwareOf.aspx

忘东忘西忘不掉你 2024-09-26 18:10:23

是的,它起作用了。准确地说,执行:

aspnet_regiis -iru

正如斯科特所说:

If you are already in this state, drop to the command line and navigate to the FX install directory.  Then run "aspnet_regiis –iru". 
    Note if you are on a 64-bit machine, run this command from the 64-bit FX install directory – not the 32-bit installation directory.

Yes, it worked. To be precise executed:

aspnet_regiis -iru

As Scott says:

If you are already in this state, drop to the command line and navigate to the FX install directory.  Then run "aspnet_regiis –iru". 
    Note if you are on a 64-bit machine, run this command from the 64-bit FX install directory – not the 32-bit installation directory.
撩发小公举 2024-09-26 18:10:23

对于我的 x64 Win7 机器,运行以下命令:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>
aspnet_regiis -i -enable

For my x64 Win7 machine worked the following command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319>
aspnet_regiis -i -enable

酒绊 2024-09-26 18:10:23

我必须使用下面的命令才能使其正常工作。有关详细信息,请参阅 http://support.microsoft.com/kb/2015129

aspnet_regiis.exe /iru

当我使用 aspnet_regiis 时.exe -iru (用连字符而不是正斜杠)它没有执行任何操作。见下文。

I have to used command below to get it working. For more detail see http://support.microsoft.com/kb/2015129

aspnet_regiis.exe /iru

When I used aspnet_regiis.exe -iru (with a hyphen instead of forward slash) it didn't do anything. See below.

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