Hi, I have the following situation:
I start up the site, configure hangfire and begin some recurring, long running background jobs which perform some complex DB validations. From within that job, I would like to send an email notifying me of the validation results, and I would like to format the mail with links to the site.
The problem is that at the startup of the job I don’t have a valid HttpContext from which I can get the URL of the site.
Is there any “dignified” solution to the problem besides storing the designated site URL in the project settings?
It’s similar to http://stackoverflow.com/questions/16986168/getting-a-web-applications-uri-during-startup/, which states there is no known site domain without a request context, I am just wondering if there is any design I’m missing which can provide me the needed info.
Thanks,
Greg