IIS Manager can't configure .NET Compilation on .NET 4 Applications

那年仲夏 提交于 2019-11-29 04:32:28

问题


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.


回答1:


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




回答2:


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.



回答3:


For my x64 Win7 machine worked the following command:

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




回答4:


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.



来源:https://stackoverflow.com/questions/3738559/iis-manager-cant-configure-net-compilation-on-net-4-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!