'IIS binding prefixes localhost

Is there a way to set up a binding in iis in the format of:

website1.localhost:80

website2.localhost:80

website3.lcoalhost:80

etc

I set the websites up to use different ports but there is a resource that is needed which is hosted on port 80 on the same server. The other websites are now looking for this resource, assuming it runs on the same port as them (example :8001, :8002, :8003)



Solution 1:[1]

In your IIS Manager, go to Edit Bindings... of your website and add a site binding with website1.localhost as host name on the port 80. Next, edit the file c:\Windows\System32\drivers\etc\hosts to append an entry:

127.0.0.1       website1.localhost

Repeat the same above steps with other websites and you can navigate to http://website1.localhost/, http://website2.localhost/...

Solution 2:[2]

I have been struggling for a week on this. My application is an ASP.NET MVC application. I tried disabling the firewall, enabling TSL12, and other things.

This was the solution!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 james