CurrentDomain.SetupInformation.ApplicationBase是web路径

其实文字扫描的一堆,根本没时间去慢慢看,路径一览,直接看结果吧,

 

System.AppDomain.CurrentDomain.BaseDirectory:
E:\jun\items\quartz1\QzWeb1\
System.AppDomain.CurrentDomain.FriendlyName:
/LM/W3SVC/3/ROOT-1-132053037719095255
System.AppDomain.CurrentDomain.RelativeSearchPath:
E:\jun\items\quartz1\QzWeb1\bin
System.AppDomain.CurrentDomain.DynamicDirectory:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\076d0df4\51798f27
System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase:
E:\jun\items\quartz1\QzWeb1\
System.AppDomain.CurrentDomain.SetupInformation.CachePath:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\076d0df4
System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile:
E:\jun\items\quartz1\QzWeb1\web.config
System.AppDomain.CurrentDomain.SetupInformation.DynamicBase:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\076d0df4
System.AppDomain.CurrentDomain.SetupInformation.PrivateBinPath:
E:\jun\items\quartz1\QzWeb1\bin
System.AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories:
E:\jun\items\quartz1\QzWeb1\bin
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName:
C:\Program Files (x86)\IIS Express\iisexpress.exe
System.Environment.CurrentDirectory:
C:\Program Files (x86)\IIS Express
System.Environment.WorkingSet:
121602048
System.IO.Directory.GetCurrentDirectory():
C:\Program Files (x86)\IIS Express
System.Windows.Forms.Application.StartupPath:(需引用System.Windows.Forms)
C:\Program Files (x86)\IIS Express
System.Windows.Forms.Application.ExecutablePath:(需引用System.Windows.Forms)
C:\Program Files (x86)\IIS Express\iisexpress.exe

 

注意:

1.有些路径是以向斜杠结束,有些不是的,如,RelativeSearchPath,PrivateBinPath,ShadowCopyDirectories

 

代码:


var s1 = "";
s1 += "System.AppDomain.CurrentDomain.BaseDirectory:<br/>";
s1 += System.AppDomain.CurrentDomain.BaseDirectory + "<br/>";
s1 += "System.AppDomain.CurrentDomain.FriendlyName:<br/>";
s1 += System.AppDomain.CurrentDomain.FriendlyName + "<br/>";
s1 += "System.AppDomain.CurrentDomain.RelativeSearchPath:<br/>";
s1 += System.AppDomain.CurrentDomain.RelativeSearchPath + "<br/>";
s1 += "System.AppDomain.CurrentDomain.DynamicDirectory:<br/>";
s1 += System.AppDomain.CurrentDomain.DynamicDirectory + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.CachePath:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.CachePath + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.DynamicBase:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.DynamicBase + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.PrivateBinPath:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.PrivateBinPath + "<br/>";
s1 += "System.AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories:<br/>";
s1 += System.AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories + "<br/>";
s1 += "System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName:<br/>";
s1 += System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName + "<br/>";
s1 += "System.Environment.CurrentDirectory:<br/>";
s1 += System.Environment.CurrentDirectory + "<br/>";
s1 += "System.Environment.WorkingSet:<br/>";
s1 += System.Environment.WorkingSet + "<br/>";
s1 += "System.IO.Directory.GetCurrentDirectory():<br/>";
s1 += System.IO.Directory.GetCurrentDirectory() + "<br/>";
s1 += "System.Windows.Forms.Application.StartupPath:(需引用System.Windows.Forms)<br/>";
s1 += System.Windows.Forms.Application.StartupPath + "<br/>";
s1 += "System.Windows.Forms.Application.ExecutablePath:(需引用System.Windows.Forms)<br/>";
s1 += System.Windows.Forms.Application.ExecutablePath + "<br/>";

转载于:https://www.cnblogs.com/ijunxiong/articles/11044363.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值