开发者

Determine which web server is being used

开发者 https://www.devze.com 2023-02-03 22:31 出处:网络
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开发者_

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

精彩评论

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