Context.Server.MapPath("/") //返回應用程序根目錄所在的位置 如 C:\Inetpub\wwwroot\
Context.Server.MapPath("~") //表示當前應用級程序的目錄,如果是根目錄,就是根目錄,如果是虛擬目錄,就是虛擬目錄所在的位置 如:C:\Inetpub\wwwroot\Example\ 注:等效於Context.Server.MapPath("~")。
Context.Server.MapPath("./") //返回當前目錄絕對路徑
Context.Server.MapPath("../") //返回上一級目錄的絕對路徑