Reputation: 13106
So...
'http://server_ip_address/application' works locally
'http://dns_address/application' works locally
'http://computer_name/application' works locally
'http://localhost/application' does not work locally
Any ideas on getting localhost to work again? It does work for the browsing the root however.
This is IIS 7.5 and ASP.NET MVC 2 running in classic mode.
Upvotes: 2
Views: 21912
Reputation: 6854
open this file c:\windows\system32\drivers\etc\hosts with the notepad and add the lines
127.0.0.1 localhost
if it is commented (default, line start with ;) then uncomment it.
and try it again.
bad: (ipv6 problem)
C:\Users\Administrator.DEVJC>ping localhost
Pinging DEVJC.vaio.cl [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Ping statistics for ::1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
good: (ipv6 and ipv4 compatible)
C:\Users\Administrator.DEVJC>ping localhost
Pinging DEVJC.vaio.cl [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
Microsoft says "# localhost name resolution is handled within DNS itself." but it is a lie (an half-lie). Sometimes is true but in a few cases it fail (or it try to resolve externally = slow)
Upvotes: 4
Reputation: 99
You can also resolve by adding the Binding information in your IIS. To do this:
After this I think you should be able to browse all applications hosted in your IIS with localhost.
Upvotes: 2
Reputation: 193
I found my problem , In my server I Have Microsoft Thread Management Gateway (Microsoft TMG) in the firewall policy there are "HTTP Protocol Policy" Right click it --> "Configure HTTP" --> "General" --> "URL Blocking" --> uncheck block high bit characters --> click OK then Apply
wait to TMG sync firewall. then go to your site and check your problem.
Upvotes: 1
Reputation: 13106
This is happening because I am only allowing SSL for the application which is enforced by a redirect mechanism to the SSL page AND the SSL only listens on the correct port.
Thanks for the help guys, I really appreciate it.
Upvotes: 4