I'm trying to add an ASP website under IIS 7.5 on Windows 7 and am having no luck so far. This site is just for me to hit locally. I need to make some changes to some of the HTML in some of the ASP files and I just need to be able to test my changes as I make them.

I installed IIS and checked the box for ASP. Next, I added an Application Pool which I called ASP and which has "No Managed Code" and "ASP" set. Next, I added the website by right-clicking "Sites" then clicking "Add Web Site...". I gave it a name, set it to use the ASP app pool, pointed it to the path where the ASP code is (I left it at pass-through authentication), and typed in 5555 as the port, so as to not interfere with the default website. The code is sitting on my server and the path simply uses the mapped drive that I always use to access files on that drive array.

When I type in http://mysite:5555, I get "could not find mysite:5555". I don't really know if all these settings are correct or what else I should try.

What am I missing?

Thanks, Jay


If you are getting Page not found, or site not found errors, then the problem is with DNS.

You have two options:

  1. For the site, edit the bindings and set it as localhost and port 5555, then when you go to localhost:5555 the site should load.
  2. Edit your etc/hosts file and add an entry for your site. I think the hosts file is located in different places based on your version of Windows. Google it. What the hosts file does, is tell your web browsers the IP address of a domain. So you can point www.yoursite.com to which would be the local computer. Then IIS will be able to find your site by name. After doing this you might have to flush DNS. Open up a cmd prompt and type ipconfig -flushdns. And once you are done coding you need to make sure that you delete the host file entry or your computer will always access the site on your own local IIS and not on the hosting server where you eventually place it.

When I code on IIS, I like to setup hosts entries for each domain name that I am coding on. This makes it a bit easier for testing when developing locally. Of course you have to be careful not to fully code your domain name into urls unless you really have to (for example a separate cookieless domain or CDN URL).

Please try editing your hosts file and let us know if that work.

  • Changing the host to "localhost" did the trick. Unfortunately, there was some problem parsing the path to my server. Copying the source to the local drive, however, did the trick. So I'm up and running now. Thanks! – birdus Nov 20 '12 at 20:01
  • Sure. If you want to test by domain name then you have to either create Host file entries or run a local DNS server. If you have a static Ip you can use that with a real dns service but then your dev will be public. When i code on IIS, i usually just set the hosts file and then revert back when deploying or test on a different pc to see the live site. The one thing you have to be careful of when you use the actual domain is that you want to make sure your site will still work in the event that your domain name changes. – Frank Nov 23 '12 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.