set up new website in iis7

Setting up new site in IIS can be tricky. Actually the process is easy most of the time it may not work for you mainly because of Application pool setting or for other unknown reason. I had similar issue setting up site in IIS7 today so I will write all the steps, What you should be doing and what you should not be doing.

This tutorial is for IIS7 on Windows7 System.

Steps to Setup Site in IIS7

  • Start IIS by typing IIS in Start-> Search Box. If it is not installed you have to install by going to Add/Remove Windows Components
  • Inside IIS, got to Sites, right click , Add new site. Name It Add new site
  • Select “Local.Yahoo.Com” then select Basic Binding. The following dialog will pop up.Screenshot 2014-09-22 19.27.41
  • Select the directory from where you want to server the site. But importantly click on the Connect as button select the user who has full permission to the directory. This is important as authentication will fail later if you do not complete this step. If you are logged in with username which does not have password. Go to System Users and create a new user, name it something like “FOR IIS” and set user name and password. After you enter those credentials here, click on “Test Settings” button and make sure both the permission have green icons.
  • Next click “Binding” from the right side, just above “Basic Binding”. The following dialog will pop up.Screenshot 2014-09-22 19.31.05
  • In the above dialog, highlight the entry, edit will become active. Then click edit. In the host name, click “”. Leave port 80 as it is as you want to direct all traffic through this port. IP Address can be to local IP or leave it as a steric. Both options are available from drop down.
  • Edit Windows host file which is located in c:WindowsSystem32driversetchosts. You will not Administrator permission. Open Notepad first by right clicking on it and select “run as administrator”. Then File open, give location.
  • Enter the following entry in a new line “”
  • Go to the binding property again, click edit on and select the browse button. It should display contents in your site if there is any index.html or default.aspx page.

Setting up Multiple Sites

You can setup multiple sites in IIS by proving hostname in the “Binding Dialog” and corresponding enter that host name in the Windows host file as well.

When you provide hostname in binding dialog (as we did, IIS recognizes that hostname and will server the appropriate site when request from a recognized host is received.

Issue with IIS Sites

There is a fair chances the site will not work in first chance. In my case, I had to play with Application pool. Changed it from V2 to V4 and Playing changing setting from Integrated to Classic. Somehow that resolved it for me, not sure why. The other sites that I created worked in Integrated mode V2 which the first site did not work. So I am not really sure why it works one time and why it doesn’t the other. Probably it is some type of bug in II7. The solution is trying changing Application pool setting, recycle it and restart the site, it *might* work.

Note that you do not need to Add Application to your website. It should work without adding any application.

If this tutorial was useful, please comment below so I can continue my other writing.

In case of Proxy Server

If you use proxy to access internet or use resources over network, you will have to add exception or use not proxy for your local site.

In FireFox, go to top menu, select Tools > Options > Advanced> Network tab > Connection Setting. Type your local domains in “No Proxy for” area. This step is required if Proxy is configured on your machine.

Summary of Errors I was getting

Explanation: The IP address for the website you requested could not be found.

The above error resolved by itself on first machine when I was playing with Application Pool Settings.

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.

HTTP Error 500.21 – Internal Server Error
Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

This entry was posted in IIS and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s