IIS 7 and Above
Can't access localhost in browser
Last post Jan 10, 2010 05:10 AM by zaheen
Apr 07, 2009 01:24 AM|miickee|LINK
Hey Hey there I cannot access my http://localhost, it comes up with nothing in firefox, and "404 Page Not Found" in IE. I have looked at the C:/Windows/System32/drivers/etc/hosts file or whatever, it has the lines:
Code: 127.0.0.1 localhost
So I don't know why it doesn't show anything. Yes, IIS is installed, and a myriad of other things (IIS 6 Metabase and IIS 6 Configuration Compatibility, ASP.NET, Windows Authentication). I have told skype not to use port 80 etc. What is interesting is that
when I do "netstat -ano", I see that 0.0.0.0 is listening on port 80, PID 4. PID 4 ends up being "NT Kernel & system". Now, I may not know what that is exactly, but i am assuming that it is important and I shouldn't terminate it. However, I really need to
get going on developing this web site and this seems like the simplest part that should just work, yet isn't.
Apr 07, 2009 04:07 AM|lextm|LINK
Can you access that using http://127.0.0.1 or
Apr 07, 2009 07:43 AM|miickee|LINK
Nope, they both have a page load error.
Apr 07, 2009 07:58 AM|lextm|LINK
Next step you may try to check IIS Manager. Is the default web site is running? Also make sure that IIS related services are running. You may use "iisreset" in a command prompt to confirm.
Apr 07, 2009 08:42 AM|miickee|LINK
Yeah, IIS manager tells me that the default website (the only one) is running, there are pages there too that I can't access. Localhost should work just on its own. iisreset confirmed that it was running, and after the command localhost still won't connect.
Apr 07, 2009 01:29 PM|lextm|LINK
Can you try "telnet localhost 80" in a command prompt?
If it takes you to a black dialog then please type in "GET /iisstart.htm" (note that what you type is not displayed, only the cursor moves when you type) and hit ENTER.
This should give you a raw HTML page displayed in the prompt.
If you can see this raw HTML page, then IIS actually works and you are facing a browser configuration problem.
Apr 07, 2009 01:52 PM|miickee|LINK
When I telnet localhost 80, it takes me to the black dialog, but as soon as I input anything it takes me back to the command prompt. Wtf? (excuse my abbreviation).
Apr 07, 2009 02:30 PM|tomkmvp|LINK
lextm - if the server is showing a 404 then IIS is in fact responding! This doesn't appear to be a connectivity issue.
IIS 6 can generate a 404 for several reasons. What sub-status code is appearing in the IIS log file for the 404 entries? That will tell us exactly what is going on here. You may consult this MSKB to lookup the status and sub-status code and what they
mean (as well as how to correct):
Apr 08, 2009 12:24 AM|miickee|LINK
Ok I have no idea where my log files are. When I try to go to properties of web site in IIS manager, in fact it never shows "properties" when I right-click. How do I check the log file??
However, I don't think this is the problem. port 80 is already being listened to, check first post. I need this fixed ASAP.
Apr 08, 2009 01:38 AM|lextm|LINK
Well, I think Tom already shows the next step.
But for IIS 7, you should take a look at this KB article,
Apr 08, 2009 04:00 AM|miickee|LINK
Actually, I am running IIS 6.1. Tom: it is not showing 404 error anymore, it just says "cannot display the web page". There are no log files whatsoever in the directory IIS manager tells me they should be.
Apr 08, 2009 04:32 AM|miickee|LINK
Ok, Visual studio won't let me open the site because the "server unexpectedly closed the connection". Apparently this is a common and simple fix because I have found with many searches that this problem is far from unique. I would be grateful for anything
that will ultimately fix my problem, not run me into new problems
Apr 08, 2009 06:12 AM|lextm|LINK
IIS 6.1? Where did you find such a version number?
Windows 2000/IIS 5
Windows XP/IIS 5.1
Windows XP x64/Windows Server 2003/IIS 6
Windows Vista/Windows Server 2008/IIS 7
Windows 7/IIS 7.5
You see there is no 6.1.
Apr 08, 2009 11:44 AM|miickee|LINK
Yes you are right, it is 7.5.
Apr 08, 2009 01:13 PM|lextm|LINK
If you are using Windows 7 Beta and IIS 7.5, then I guess the KB article for IIS 7 may still apply.
Apr 09, 2009 12:11 AM|miickee|LINK
it doesn't apply in the slightest because noone has told me how to access my log files, IIS manager tells me it's in a certain directory, and when I go to it nothing is there. I can't check the status codes of logs that aren't there
Jan 10, 2010 05:10 AM|zaheen|LINK
I am using windows 7 pro, and I have installed IIS by following a tutorial video from internet. Everything working fine when I type 127.0.0.1 , but with localhost, it's not working. I read many posts from net too, but no solution. I am using bitdefender
internet security 2010.
please can you tell me how can I access to localhost? I just wanted to know, but so far I can work with my web server with 127.0.0.1 / ASP.NET/PHP working fine. but when I tried to install DOT NET 3.5, I cannot see anything happening, no istallation is happening,
but I can see 2.X.XXXXX is installed with IIS.
Thanks in advance
I found the solution and it's here..
I have solve this problem, it's just very simple. to solve this problem please go to;
C:\windows\system32\drives\etc\ and open hosts with notepad or a similar text editor.
You will see a line like below;
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Just remove the # before 127.0.0.1
that's all, it's that simple