In this article I will explain how to register ASP.Net with IIS i.e. installing the ASP.Net in IIS so that ASP.Net pages can be served from IIS server. If ASP.Net is not registered with IIS then when accessing ASP.Net Website you will get the following error. The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Once the ASP.Net is registered the IIS will show ASP.Net 4.0 Application pools.
Installing the .Net Framework
The very first thing you need to do is download and install the necessary .Net Framework on your system.
Look for the aspnet_regiis.exe file
Once the .Net Framework is installed, you can look for the aspnet_regiis.exe file for registering the .Net Framework in IIS server.
If your windows is installed in C drive you could find the aspnet_regiiis.exe at the following locations.
32 BIT
C:\Windows\Microsoft.NET
64 BIT
C:\Windows\Microsoft.NET\Framework64
Now based on whether your System is 32 BIT or 64 BIT and the .Net Framework version you want to register, you need to get into the .Net Framework Folder.
In my case the Windows is 64 BIT and I need to register .Net Framework 4 I am looking for the aspnet_regiis.exe in the following location C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Registering the ASP.Net with IIS server
Now you need to start command prompt by typing cmd at the Run command and then execute the command prompt with Administrator rights by right clicking and choosing Run as administrator from the context menu.
Then on the command prompt you need to navigate to the Directory that has the aspnet_regiis.exe file for that you need to type
CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
And then you need to type the following command and hit enter to register ASP.Net with IIS.
Once the ASP.Net is installed in IIS, you will see ASP.Net 4.0 Application pools in the IIS server
That’s it and you are done with registering the ASP.Net with IIS. Here I have shown you how to register .Net Framework version 4.0 in similar way you can register other versions.