Unable to map subdomain in host local webserver

I am developing a web application using asp.net mvc framework with community subdomain concept.

I am implementing the concept of mapping wild cards on a domain like * .example.com. To test the concept in vs 2008, I edited the hosts file and add some subdomain like

127.0.0.1 a.localhost

127.0.0.1 b.localhost

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

When trying to get the url: http: //a.localhost: 1760 /

The following error occurred:

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

      

Dnsserver returns:

Name Error: The domain name does not exist. 

      

It means that:

The cache was unable to resolve the hostname specified in the URL. Check if the address is correct.

What should I do to fix this error.

+2


source to share


1 answer


localhost cannot have subdomains - it is a reserved DNS name that simply does not support them. You can use a.myhost.example and b.myhost.example instead, but keep in mind that Cassini, the VS development web server does not understand host headers.



+1


source







All Articles