C#中的PHP$_SERVER[';DOCUMENT_ROOT';]等效程序


PHP $_SERVER['DOCUMENT_ROOT'] equivalent in C#

我正在转换c#中的PHP代码,想知道c#中的等效代码。

我想我可以使用:

HttpContext.Current.Request.ServerVariables["PARAM"]

但不确定哪个"PARAM"需要使用,下面的链接有所有参数列表:-

http://www.w3schools.com/asp/coll_servervariables.asp

也许使用ASP MapPath方法?

文件:http://www.w3schools.com/asp/met_mappath.asp