摘要: 自己写的windows服务本地运行没事,放到服务器上报1053无法启动: 碰到这种情况首先去查看一下日志,看出错原因根源是什么? 由此可以得出问题原因出在版本不同,解决方法 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4. 阅读全文
posted @ 2020-04-08 15:24 一介桃白白 阅读(11406) 评论(0) 推荐(0)
摘要: 1. 新建项目 windows桌面 windows服务 2. 右击 添加安装程序 3. 右击 属性 4. 右击service1查看代码 public partial class Service1 : ServiceBase { private int num = 1; public Service1 阅读全文
posted @ 2020-04-08 11:19 一介桃白白 阅读(440) 评论(0) 推荐(0)
摘要: 新建一个 DataLog类 用来存放生成Log日志方法 #region 写日志 public void WriteLogEx(string sendJson, string code = "", string msg = "", string fileName = "") { string path 阅读全文
posted @ 2020-04-08 09:09 一介桃白白 阅读(240) 评论(0) 推荐(0)