The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> IIS
|
Unable to access localhost via DNS?
Discuss Unable to access localhost via DNS? in the IIS forum on Dev Shed. Unable to access localhost via DNS? IIS forum discussing Microsoft's Internet Information Server including its configuration, optimization and other related topics. IIS is the most popular web server for the Windows platform.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 6th, 2003, 06:04 AM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation 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.
|

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
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation 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
|

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
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation 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
|

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
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation 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
|

November 8th, 2003, 08:21 AM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation 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
|

November 8th, 2003, 09:32 AM
|
|
|
I'm glad you got it sorted out 
|

January 2nd, 2004, 12:41 AM
|
|
Junior Member
|
|
Join Date: Jan 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation 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,
|

January 2nd, 2004, 06:04 AM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|

January 2nd, 2004, 10:47 AM
|
|
Junior Member
|
|
Join Date: Jan 2004
Posts: 5
Time spent in forums: < 1 sec
Reputation 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
|

January 2nd, 2004, 11:51 PM
|
|
|
|
billspeg, post a new topic. I'm closing this one.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|