Add a website to local IIS7 and browse to it with friendly name

Written by stevey on October 2nd, 2012
  1. Launched IIS7 -> Sites -> Add Web Site
  2. Entered; left application pool with default name
  3. Mapped to physical path H:\Development\\Yangsoft.Web
  4. Pick a unassigned port: 8092
  5. Host name: (hopefully, this will precede the real domain name, once the entry is made into hosts file)
  6. After exiting IIS7, browsed to C:\Windows\System32\drivers\etc and opened the hosts file with notepad
  7. Added this entry: and saved.
  8. Browsed to http://localhost:8092 but get a bad request error 400: invalid hostname
  9. Returned to IIS7 and changed App Pool Identity “” to use .net 4.0 and Integrated Mode. By default, whenever a website was first setup, it uses .net v 2.0
  10. Now go to browser and type in and it brought up the local site that is in development folder, not in the deployed folder.
  11. In order to launch the website from VS 2010 IDE in the same fashion, I went into VS2010 web project properties and changed the Servers setting from “Use Visual Studio Development Server” to “Use Local ISI Web server” and pasted in the url:
  12. Ran the project in debug mode and now the website rendered as instead of the http://localhost:2236/Default.aspx or whatever random port number the IDE picks for you.

Leave a Comment