November 6th, 2003, 06:04 AM
Unable to access localhost via DNS?
I am having a problem with IIS for which I can find no way around.
I cannot access a web site on the local system (Server 2003 RC2 running IIS 6) via http://localhost or http://systemname. However, I can access the site via the loopback address (http://127.0.0.1) or the ip address of the system. Also, specific pages (such as http://localhost/default.html) can be navigated to.
When trying to access the system via localhost or systemname, I get the error message "cannot find server/dns". Also, when trying to create a new asp.net application in VS.NET, I always get an error that the url does not map to the path given (http://localhost/webapp does not map to c:\inetpub\wwwroot\webapp).
I have done/checked the following:
1. Restarted the IISAdmin service (along with WWW Publishing).
2. Reset IIS using iisreset.
3. Restarted the system.
4. Made sure there isn't something obviously wrong (IIS is started and running the web site, SSL is not being used, spelling, home directory local path, default content pages).
5. Verified system in not infected by nimda.
6. ASP and ASP.NET are both allowed.
7. Disabled ICF (apparently no effect on IIS).
I've searched for almost two hours online looking for an answer to the problem without any results. I have also posted to microsoft's newsgroups, from which the only answer I got was to make sure the home directory local path is correct. I'm really confused by this error because I have an asp application on a XP Pro system (running IIS 5) at work that is running without a problem.
If anyone can answer this I would greatly appreciate it.
Last edited by shaulahuva; November 6th, 2003 at 06:08 AM.
November 6th, 2003, 02:04 PM
It sounds like localhost isn't entered in your hosts file.
Dunno about 2003, but in W2K/XP you find the hosts file in \winnt\system32\drivers\etc
November 6th, 2003, 07:31 PM
I checked the hosts files (there appears to be two, one in the systemroot directory and one in the systemroot\system32\drivers\etc directory). Both had localhost listed as:
I've also tried navigating to http://localhost.localdomain and http://dim4300.mshome; both work.
I feel like I'm just missing something that's obvious, but I can't think of what.
On the plus side, this problem doesn't have anything to do with my web application creation problem, I was able to figure it out. This isn't that big of a problem, but I don't like letting problems go without correcting them.
November 7th, 2003, 06:31 PM
Another thing to check is the IIS setting for what documents are "default" documents that will open automatically from a folder only url.
If you can open http://localhost/default.html in your browser, but http://localhost errors out, one reason is you don't have a page that's a default document page. default.html is not a standard default page for IIS, although default.htm is.
You can add/edit default documents using the IIS service manager.
November 7th, 2003, 10:32 PM
I had already checked to make sure I had default.html added as a default content page. I also changed it to default.htm just to make sure nothing wierd was going on -- no success.
November 7th, 2003, 10:51 PM
One more thought, if you are not connected to the Internet when you are trying to access the web page, you may need to retry the page to get tcp/ip initialized properly. I know I have to do this when I'm working on a page in my laptop and not hooked up. The first attempt to go to a local web page fails, click refresh and then all is fine until I reboot.
November 8th, 2003, 08:03 AM
I've tried both being connected to the internet and not, neither seems to make a difference.
I just realized what the obvious thing I was missing is. The url shows up as http://18.104.22.168/search.cgi?acc=1010&q=ocalhos when localhost isn't found. Apparently, this is either a virus or adware. Guess I'll do some checking and see how I can get rid of it.
November 8th, 2003, 08:21 AM
Just wanted to let you know it was adware -- I downloaded adaware and ran it. There was a running process found to be adware. Now everything works normally.
It's really weird that I have another adware detection app that didn't detect this. I guess that's why adaware is so popular.
November 8th, 2003, 09:32 AM
I'm glad you got it sorted out
January 2nd, 2004, 12:41 AM
Can you advise how to detect the adaware process ? I have the same problem on my machine. Appreciate you could share the solution with me.
Thank you very much.
January 2nd, 2004, 06:04 AM
January 2nd, 2004, 10:47 AM
I can't get internal domain on machine even after aliasing dns
hi i have never been able to access my web site from a local machine unless i use the local ip address192.168.1.x i was told this could not be done because of the way my firewall NAT works if any body knows a way i could get access by my domain www.techunit.org rather than the internal ip please let me lknow
January 2nd, 2004, 11:51 PM
billspeg, post a new topic. I'm closing this one.