01 2017 档案

摘要:ICSharpCode.SharpZipLib.dll using ICSharpCode.SharpZipLib.Zip; string[] filenames = Directory.GetFiles(dirPath); using (ZipOutputStream s = new ZipOut 阅读全文
posted @ 2017-01-20 11:41 Andy·Li
摘要:Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); 阅读全文
posted @ 2017-01-19 16:01 Andy·Li 阅读(208) 评论(0) 推荐(0)
摘要:服务安装: @echo off echo 开始安装 :: set "abc=%cd%"echo 当前正在运行的批处理文件所在路径:%~dp0 %systemroot%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe %~dp0\appName.e 阅读全文
posted @ 2017-01-19 15:53 Andy·Li 阅读(197) 评论(0) 推荐(0)
摘要:如果碰到 windows 服务安装不了或者启动不了,报14001的配置文件错误,那么 可以从.exe.config入手,我这次遇到的是配置中有中文注释导致的。 我把空行以及中文的注释去掉以后,整个世界都不一样了,哈哈哈。 阅读全文
posted @ 2017-01-11 15:53 Andy·Li 阅读(1929) 评论(0) 推荐(0)
摘要:服务没有停止的情况下,如果修改了配置,如果不刷新,是不会生效的,需要在每次重新读取配置前刷新配置文件,具体如下: ConfigurationManager.RefreshSection("appSettings"); 阅读全文
posted @ 2017-01-11 11:58 Andy·Li 阅读(430) 评论(0) 推荐(0)