Creating Or Adding A New Site And Prepare Environment For .Net Application Deployment At IIS Localhost

In this blog, I am going to describe the process for creating or adding a new site on the IIS server (localhost) and deploy the application build. There are some dependencies such as installing .NET framework on IIS. Please check out my previous blog for the same. Let’s get to the steps.

Step 1

Open IIS Manager. To open the IIS Manager, open Control Panel and click “Internet Information Services (IIS) Manager”.



Expand the Server and right click on the "Sites" and add a website.



Now, in "Add Web Site" window, we have to provide site name, physical path, and host name.

 

Notes
  • Site name - as the name suggests, the name of the site.
  • Physical Path - Folder location where we are going to keep/deploy our build (Application code/build). In my case, I have created a folder at E:\localWeb\webapp.com.
  • Host name - the site name followed by .com, .ind, .in etc.
  • IP Address, Port number, and protocol type are optional, but if we have this information, then we can provide these details as well.
  • While creating a new site, it will create a new application pool for the site as well, as you can see alongside the Site Name.
  • Check the framework version of the application at application pool and change it to the required framework.
Step 2

Once we have added a new web site on the server, we need to add the Host name to host file along with the IP address. To do that, we need to open host's file from following location and edit. It’s important to ope a text editor as administrator.

Folder Location

C:\Windows\System32\drivers\etc
 
 

Once the file is opened, we need to add the URL/ Host name and the IP address and save it.

Syntax

<IP Address> <Host name>

E.g.

127.0.0.1 webapp.ind

Since we are working on local system, we would be using 127.0.0.1 as IP address.

 

Step 3

After completing the above steps, some required features on IIS need to be activated. To do that, we have to open control panel and click on “Turn windows features on or off”.

 

Here, we have to turn on the following IIS features, such as -
  • All application development features under “World Wide Web Services”.
  • IIS Management Console under “Web Management Tools”.
 

Finally, our deployment environment is ready for application deployment. In my forthcoming blog, I will describe how to deploy latest application build on our deployment environment.
Ebook Download
View all
Learn
View all