Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unable to connect to localhost and http:// on one of my machines. However http://machinename works.

This results in the Windows Token Application being not able to issue tokens, because it can't connect.

This is showing up in the event log:

Request for security token failed with exception: 
System.ServiceModel.EndpointNotFoundException: Could not connect to 
http:// localhost : 32843/SecurityTokenServiceApplication/securitytoken.svc/actas. 
TCP error code 10061: No connection could be made because the target machine actively 
refused it

I am able to ping to localhost:

Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms

likewise for

Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128

The hosts file is unaltered and has no active entry in it.

After issuing the netstat -ao | findstr LISTENING command in Powershell I found these 2 entries:

TCP machine:0 LISTENING 4 TCP machine:0 LISTENING 4

which look ok and indicate that the service is up and running. In addition, every Application pool is up and the websites are running and also accessible from the outside (read our LAN).

If you need additional information please ask for them in the comments and I will add them to this post.

Please help me in finding the missconfiguration. Kind regards.

share|improve this question
on which port your iis daemon is running? 32843 is this port is allowed on your server firewall? – Abhishek Anand Amralkar Nov 29 '13 at 9:28
The server firewall is deactivated; but the appropriate rules are specified. But this is not about the ports, but the fact that localhost does not work - on any port – Marco Nov 29 '13 at 9:29
Does the machine have multiple IP adresses? I had the problem and had to set localhost to point to a specific IP address in the hosts file to get it to work. – UnusualMutant Jan 31 '14 at 10:06

I've had the same problem, but localhost worked because ::1 address was listening as well as network ip. This command helped me

netsh http add iplisten
share|improve this answer
Links to external resources are encouraged, but you should include contextual information with the link so that other users will have some idea what it is and how it relates to the topic. Always quote the most relevant part of the external resource as its URL may change or go permanently offline. See Are answers that just contain links elsewhere really “good answers”? – Anthony Geoghegan Jan 6 at 11:12
I hoped stackoverflow is not an external url for serverfault =) Will update the answer now – Lanayx Jan 6 at 11:32
I wouldn't really call stackoverflow external either but in general it's best for answers to be as self-contained as possible. That's a much better answer now (Upvoted - though I'd have probably kept the original link as "Please, check this answer" doesn't make sense any more) . – Anthony Geoghegan Jan 6 at 12:11
Thank you, cleaned it up – Lanayx Jan 6 at 12:16

TCP machine:0 LISTENING 4 TCP machine:0 LISTENING 4

Your service is bound only on and not to the loopback addresses (, ::1:). You need to reconfigure IIS to listen on the loopback address of your choice, either IPv4 or IPv6, or listen on all available addresses ( as appropriate.

share|improve this answer
How to reconfigure it? – sємsєм Dec 14 '15 at 22:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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