Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Register .NET Framework 4.5 in IIS 7.5

Tags:

Pieces of the puzzle:

  • Windows 7
  • .NET Framework 4.5 (installed)
  • IIS 7(Version 7.5.7600.16385)
  • Visual Studio (Ultimate 2013)
  • MVC4 (multiple projects in the solution)

The solution I'm running in Visual Studio works and runs as expected with IISExpress.

To set up my site to use IIS, I tried the following steps:

  1. Right-click the projects in the solution that are currently being hosted by IISExpress.
  2. Click Properties.
  3. Toggle the Servers drop-down from IISExpress to Local IIS
  4. Try to build/run the application

At this point, I get an HTTP 500.21 error.

I have also tried to run aspnet_regiis.exe -i using Visual Studio's command prompt (as an Administrator), but each time I run the command, I receive the following error:

Command 'aspnet_regiis.exe' is not valid.

I also confirmed that I do have the right aspnet_regiis.exe installed (by checking here) (.NET Framework version 4 (64-bit systems)).

What do I need to do to register .NET Framework 4.5 in IIS 7.5?

like image 896
id.ot Avatar asked Jun 04 '14 03:06

id.ot


People also ask

How do I enable .NET Framework in IIS?

Enabling Windows Internet Information Services (IIS)In the Server Roles tab of the Add Roles and Features wizard, check the Web Server (IIS) box. The default values provide all the functionality LEC AIM needs. On the Features tab of the Add Roles and Features wizard, check the . NET Framework 4.


1 Answers

You can find the aspnet_regiis in the following directory:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319 

Go to the directory and run the command form there. I guess the path is missing in your PATH variable.

like image 157
Peter Avatar answered Sep 30 '22 01:09

Peter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!