I am currently testing a site with multiple subdomains pointing to the same ASP.NET application, and routing processes what needs to be done with each request.
For testing, I added several subdomains to my "hosts file", for example. "127.0.0.1 admin.TestDomain.com", which works fine.
However, the problem is that when I call any function in C # to get the hostname / domain / url (HttpContext.Current.Request.Url ...), the host url always returns with "localhost", and than " TestDomain ".
Any ideas why this name is resolved this way, and where can I get "TestDomain.com"?
Paul grimshaw
source share