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.
精彩评论