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.

Noffls
  • 5,397
  • 2
  • 29
  • 36

4 Answers4

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

Noffls
  • 5,397
  • 2
  • 29
  • 36
  • 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. – SoftwareSavant Feb 21 '13 at 13:13
  • YES! Thanks a trillion! – jlaverde Jun 11 '15 at 15:30
  • "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 '16 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

serge
  • 13,940
  • 35
  • 121
  • 205
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.

Diganta Kumar
  • 3,637
  • 3
  • 27
  • 29