在Windows服務(wù)里面,如果訪問文件,采用絕對(duì)路徑可以.如果采用相對(duì)路徑,和生成的服務(wù)文件在同一目錄下面.
using System.Reflection;
using System.IO; string assemblyFilePath = Assembly.GetExecutingAssembly().Location;
string assemblyDirPath = Path.GetDirectoryName(assemblyFilePath);
niList = Utility.GetXmlInfo(assemblyDirPath + "
\\FtpHelp.xml");
posted on 2008-10-07 13:20
天書 閱讀(1263)
評(píng)論(0) 編輯 收藏 引用