44

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.

2
  • 1
    what is the unrecognized element?
    – x0n
    Sep 17, 2010 at 20:07
  • 2
    the unrecognized element is "folderLevelBuildProviders"
    – Noffls
    Sep 19, 2010 at 15:39

4 Answers 4

69

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
  • 4
    excellente... Thanks much. It took my a while to figure out what to do. But if you run into this problem. Open up a cmd prompt, navigate to the C:\Windows\Microsoft.NET\Framework64\v4.0.30319 directory in the prompt and then run the above command. And viola, you can then access the .net compilation settings. Feb 21, 2013 at 13:13
  • "If you install VS2010 and/or .NET 4 first, then later install IIS, you need make sure IIS is configured to know about ASP.NET 4 otherwise IIS will have no idea how to run ASP.NET 4 applications." Yes! and this command solved the problem.
    – Maske
    Jul 19, 2016 at 13:59
12

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.
5

For my x64 Win7 machine worked the following command:

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.