How can a .NET code know whether it is running within a web server application?

前端 未结 7 1479
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 02:49

I have a library code, which should be aware whether it is executed in the context of a web server or standalone application server.

The obvious that comes to mind i

相关标签:
7条回答
  • 2020-12-06 03:36

    See the answer I provided here...

    Basically, you can use HostingEnvironment.IsHosted.

    0 讨论(0)
提交回复
热议问题