[c#] How to get current domain name in ASP.NET

the Request.ServerVariables object works for me. I don't know of any reason not to use it.

ServerVariables["SERVER_NAME"] and ServerVariables["HTTP_URL"] should get what you're looking for