Working on an ASP.Net Core MVC app and wondering what the best way is to dynamically determine at run time if my code is running on Azure or not?
Thanks
Donal
Working on an ASP.Net Core MVC app and wondering what the best way is to dynamically determine at run time if my code is running on Azure or not?
Thanks
Donal
See Kudu's Environment page:
https://sitename.scm.azurewebsites.net/Env.cshtml
Check for the existence of App Service specific environment variables:
WEBSITE_SKU
WEBSITE_SCM_SEPARATE_STATUS
WEBSITE_HOSTNAME = __sitename__.azurewebsites.net