Installing .Net framework (application build on version of framework) is needed when we are setting up our own server and deploying the application. In my case I am going to use .NET v4.0 framework for the same. Let’s get to the steps.
Step 1
Open IIS manager and check for the default .NET framework on the server. Most of the time it is set to v2.0.
Once manager window is opened, expand server and click Application Pool. It will show the application pools on the server.
Here you can see the default .NET framework of respective applications at application pool.
Step 2
Browse to following location. Here we can see the frameworks installed on the system.
C:\Windows\Microsoft.NET\Framework\
If the required framework version is not found, then download the required version of .NET framework and install it on the system. Remember that installing it on the system is not going to install it on IIS server.
In my case it is v4.0 and I have installed it on the system. The folder v4.0.30319 might be different in your environment. Once the framework is installed on the system then follow the next steps.
Step 3
Open command prompt as administrator and run the following command.
- cd Microsoft.NET\Framework64\v4.0.30319
- aspnet_regiis.exe –i
This will install .NET 4.0 at IIS server. Once finished again open the IIS server and then you can see the .NET framework on application pool. To set the application to the latest installed double click on the application and change it to v4.0.
The above information will be helpful in deploying ASP.NET applications on our hosting environment. This means we have our own server and IIS hosting environment. In this blog I have demonstrated it on Windows 7 machine not a windows server 2008/2012/2016, but it will be more or less similar on the server also.
In my forthcoming blogs, I will describe how to create/add a new site/domain at IIS, make a deployment of application, etc.