2

I am developing a web application using Asp.net mvc framework with concept of sub domain for community.

I have implement concept of wild card mapping of domain like *.example.com. To test concept in vs 2008 i edited hosts file and add some sub domain like

127.0.0.1 a.localhost

127.0.0.1 b.localhost

When i request url http://a.localhost:1760/ i get error

While trying to retrieve the URL: http://a.localhost:1760/

The following error was encountered:

Unable to determine IP address from host name for a.localhost 

The dnsserver returned:

Name Error: The domain name does not exist. 

This means that:

The cache was not able to resolve the hostname presented in the URL. Check if the address is correct.

What i should do to resolve this error.

Vivek
  • 570
  • 8
  • 21

1 Answers1

1

localhost can't have subdomains - it's a reserved DNS name that simply doesn't support them. You could, instead, use a.myhost.example and b.myhost.example, but be aware that Cassini, the VS development web server doesn't understand host headers.

blowdart
  • 55,577
  • 12
  • 114
  • 149