查看: 921|回复: 1
|
如何用 C# get realpath in IIS?
[复制链接]
|
|
在 Java Servlet class 里,能够:
this.config.getServletContext().getRealPath("/");
而得到 web server context path. For an example, web server real path is:
C:\\Tomcat\webapps\my-server-context\
同样的,我要在 IIS 里,用 ASP.NET C#,能如何做到? |
|
|
|
|
|
|
|
楼主 |
发表于 5-4-2007 02:48 PM
|
显示全部楼层
回复 #1 flyingfire 的帖子
Oops! 已经研究到如何能做到了.
For those who duno yet, this is the way:
System.Web.HttpContext.Current.Server.MapPath("" |
|
|
|
|
|
|
| |
本周最热论坛帖子
|