任何人能解释的区别Server.MapPath("."),Server.MapPath("~"),Server.MapPath(@"\")和Server.MapPath("/")?
有什么区别Server.MapPath()和HostingEnvironment.MapPath()?是否Server.MapPath()有任何优势了HostingEnvironment.MapPath()?
我原来的问题是当服务器上的文件路径HttpContext不存在时映射,我无法将Server变量传递Global.asax给我的方法.
我用HostingEnvironment.MapPath()它代替,因为它不需要HttpContext.有这两种方法会产生不同结果的情况吗?