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/>";

posted @ 2019-06-18 11:40  以函  阅读(647)  评论(0编辑  收藏  举报