Bit of a long shot, but is there a way in ASP.NET to dynamically get the website's URL (http://www.example.com) when there is no HttpContext.Current available.
There is no HttpContext because the code is running in a background thread* (but under the ASP.NET AppDomain). I have a background process that sends emails out every evening, and needs to include the Web address, but I don't want to hard code it because of deployments and testing (it changes from http://localhost:12345 to http://testing.example.com and then to http://www.example.com for the live site).
*Please don't advise a Windows Service, I'm aware of these but hosting restrictions prevent me from doing this.