获取物理路径相关

1、MVC网站:AppDomain.CurrentDomain.BaseDirectory

2、定时Job获取当前Job所在路径:

string processPath =Process.GetCurrentProcess().MainModule.FileName;
processPath = Path.GetDirectoryName(processPath);
原文地址:https://www.cnblogs.com/zhaoyihao/p/7383229.html