开发者

Determine which web server is being used

I have a web app (ASP.net with VB.net) that will run on one of three web servers. I would like to know, at run time, which web server the app is on. How can I determine which web server the app i开发者_如何学Pythons on?


System.Environment.MachineName should get the name of the webserver for you.


The usual way is to set environment variables in your webservers config/virtual hosts.

Well that is the common practice for apache/php applications. but it should be pretty much the same in commercial windows environments. only called differently and infinetly times more expensive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜