I need to know the exact the domain name that the user is requesting. I am currently using Request.ServerVariables["HTTP_HOST"] but doesn't give eactly what I need. For example, if the HTTP_HOST is:
mydomain.com:8080
abc.mydomain.com
xyz.mydomain.com:5000
I need all these to return "mydomain.com". What's the best way to do this? I need to make sure the domain is only return since my application uses this info to differentiate different domain names pointing to the same web application. Any suggestions?
mydomain.com:8080
abc.mydomain.com
xyz.mydomain.com:5000
I need all these to return "mydomain.com". What's the best way to do this? I need to make sure the domain is only return since my application uses this info to differentiate different domain names pointing to the same web application. Any suggestions?