#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0

    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.

    Thanks!

    Paul K
    Last edited by shaulahuva; November 6th, 2003 at 06:08 AM.
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    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
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0
    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:

    127.0.0.1 localhost

    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.

    Paul K
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    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.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0
    Doug,

    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.

    Paul K
  10. #6
  11. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    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.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0
    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://213.159.117.233/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.

    Paul K
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0
    Doug,

    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.

    Thanks!

    Paul K
  16. #9
  17. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    I'm glad you got it sorted out
  18. #10
  19. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    Solution


    Paul K,

    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.
    Regards,
  20. #11
  21. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    6
    Rep Power
    0
    I think I mispoke when I said there was a process running. There was an adware process running, but my wife wanted the software, so I'm not too concerned about that.

    As far as the redirection to http://213.159.117.233/search.cgi?acc=1010&q=ocalhos, check out the following link:

    http://www.spywareinfo.com/~merijn/cwschronicles.html

    If you search for the ip address, you'll see that this happens from one of the coolwebsearch variants (the file is c:\windows\system32\dreplace.dll).

    Hope this helps!

    Paul K
  22. #12
  23. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    5
    Rep Power
    0

    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
  24. #13
  25. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,444
    Rep Power
    4539
    billspeg, post a new topic. I'm closing this one.

IMN logo majestic logo threadwatch logo seochat tools logo