Beginners guide: How to Install IIS and setup your first Asp.net Web site

Introduction:
In this article you will learn about how to install IIS and setup your first asp.net website.
As a first step, we need to enable the IIS in our system; by default it won’t be available
To enable just go to Control panel->Program and features->Turn windows features on or off ->And finally check the iis services like the below screen shot .

word-image

This process will take some time and you will get a screen shot like below:

word-image-1

That’s it Now IIS will be available like the below screenshot:

word-image-2

When you open it,you will see the screen like below with your computer name

word-image-3

Just for your information, this process will also add the folder called inetpub in the c drive

word-image-4

 

(Note this is the place where you can add your websites to host in IIS)

 

Adding the websites to IIS:
Next step is that, to create the new website in iis and map to the website project folder placed in the inetpub.
So right click the sites folder and you will the get add website option like below screen shot

word-image-5

 

word-image-6

 

Once the website has been added, click the content view at the bottom of right pane, like the below screenshot to browse the page which you want to see in the browser.

word-image-7

Then you will see the screen like below:

word-image-8

Right click the login.aspx (any page you want to see) and you will see browse option like below:

word-image-9

Output:

word-image-10

Possibility of Error:
First time when you install the IIS, you may get the following error. I got the same error for two or three times initially so sharing the same with others.

word-image-11

Reason for the Problem: We need to register the Asp.net with the IIS
Source: https://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx
Solution:
Just two Steps to register Asp.net with IIS:
Step 1: Open the cmd prompt as administrator and type the following path
C:\windows\microsoft.net\framework64\v4.0.30319

word-image-12

Step 2: Then just type aspnet_regiis –i like below screen shot

word-image-13

That’s it, you registered successfully…?
If you want, just for the verification, you can see two app pools were added to the Application pools like below screen shot:

word-image-14

Finally you will get the output as expected:

word-image-15

You can also find other useful Articles related to IIS in my websites:
http://www.learnandshare-karthik.com/2016/08/31/map-the-user-friendly-host-name-with-its-corresponding-ip-address-using-host-file-in-iis8/
Conclusion:
Hope the article was helpful, kindly share your valuable feedback or thoughts in the comment section.
Thanks
karthik

1,005 total views, 3 views today

Leave a Reply

Your email address will not be published. Required fields are marked *