I am currently testing a site with multiple sub domains pointing to the same ASP.NET application, and the routing handles what to do with each request.
For testing, I have added several sub domains to my "hosts file", e.g. "127.0.0.1 admin.TestDomain.com", which is working fine.
However, the problem is that when I call any function in c# to get the host name/domain/url (HttpContext.Current.Request.Url...), the host url always comes back with "localhost", rather than "TestDomain".
Any ideas why this name is being resolved in this manner, and where I can get hold of "TestDomain.com"?