确定是否应用程序在蔚蓝的或不运行或不、应用程序、蔚蓝

2023-09-03 00:22:29 作者:街角、独自捡幸福

我有一个asp.net MVC应用程序,内置于IIS或在云中运行的标准Web应用程序。

I have an asp.net mvc app that is built to run as standard web app in iis or in the cloud.

我需要能够确定应用程序被托管在蔚蓝(DEV织物或云),或者如果它被作为运行在IIS下标准Web应用程序。

I need to be able to determine if the app is being hosted in azure(dev fabric or cloud) or if it is being run as standard web app under iis.

如何才能知道它是在云中运行?

How can I tell if it is running in cloud?

推荐答案

想我找到它:

Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.IsAvailable

感谢

@Wheat:感谢这样一个快速反应,使得stackoverflow.com一个很好的资源

@Wheat: Thanks for such a quick response, makes stackoverflow.com a great resource.