windows服务,配置程序随系统启动
高胜
2023-05-23 2d80ee122541898b7e3e4dc5507997498be9b484
更新链接
1个文件已添加
1个文件已删除
19个文件已修改
71 ■■■■■ 已修改文件
RestartService/.vs/RestartService/v14/.suo 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/Alarm/AlarmHp.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/App.config 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/Monitor/Packet.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Debug/RestartService.exe 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Debug/RestartService.exe.config 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Debug/RestartService.pdb 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Debug/RestartService.vshost.exe.manifest 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Release/RestartService.exe 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Release/RestartService.exe.config 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Release/RestartService.pdb 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/bin/Release/RestartService.vshost.exe.config 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Debug/RestartService.csproj.GenerateResource.cache 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Debug/RestartService.csprojResolveAssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Debug/RestartService.exe 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Debug/RestartService.pdb 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Release/RestartService.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Release/RestartService.csproj.GenerateResource.cache 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Release/RestartService.csprojResolveAssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Release/RestartService.exe 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/RestartService/obj/Release/RestartService.pdb 补丁 | 查看 | 原始文档 | blame | 历史
RestartService/.vs/RestartService/v14/.suo
Binary files differ
RestartService/RestartService/Alarm/AlarmHp.cs
@@ -31,7 +31,7 @@
            //var result = HttpHp.Post<ResponseData<object>>(ConfigurationManager.AppSettings["ApplicationAlarm"].ToString(), data);
            //if (result != null && result.code == 0)
            {
                WechatAlarm(serviceName, "CUSTOM_ALARM", content, ip, "HIGH", title);
                WechatAlarm(serviceName, "warn-system", content, ip, "HIGH", title);
            }
        }
@@ -51,12 +51,30 @@
            //var result = HttpHp.Post<ResponseData<object>>(ConfigurationManager.AppSettings["ServiceAlarm"].ToString(), data);
            //if (result != null && result.code == 0)
            {
                WechatAlarm(serviceName, "SPRING_BOOT_ADMIN", content, ip, "HIGH", title);
                WechatAlarm(serviceName, "OFFLINE", content, ip, "HIGH", title);
            }
        }
        public static void WechatAlarm(string serviceName, string alarmType, string content, string ip, string alarmLevel, string subType)
        {
            //var dto = new
            //{
            //    alarmType = alarmType,
            //    content = content,
            //    serviceIp = ip,
            //    serviceName = serviceName,
            //    trace = Guid.NewGuid().ToString().Replace("-", string.Empty),
            //    alarmLevel = alarmLevel
            //};
            //var data = HttpHp.GetSignRequestJson(dto);
            //var result = HttpHp.Post<ResponseData<object>>(ConfigurationManager.AppSettings["ApplicationAlarm"].ToString(), data);
            //if (result != null && result.code == 0)
            //{
            //    //WechatAlarm(serviceName, "SPRING_BOOT_ADMIN", content, ip, "HIGH", title);
            //}
            var wechatDto = new
            {
                alarmType = alarmType,
RestartService/RestartService/App.config
@@ -10,9 +10,9 @@
    <add key="ServerIp" value="118.31.3.103"/>
    <add key="ApplicationAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="http://iot.hdlcontrol.com:8888/hdl-support-monitor/api/alarm/alarmPush"/>
    <add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>
    <add key="ApplicationAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <!--<add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>-->
    <add key="AppKey" value="HDL-HOME-APP-TEST"/>
    <add key="SecretKey" value="WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"/>
RestartService/RestartService/Monitor/Packet.cs
@@ -60,7 +60,7 @@
                            //PointLogUtil.LogsUtil.WriteLog("数据转发服务已恢复正常,不可用状态持续" + minuite + "分钟!");
                        }
                        System.IO.File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + $"UDPStart.txt", "数据转发服务!\r\n\r\n");
                        //System.IO.File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + $"UDPStart.txt", "数据转发服务!\r\n\r\n");
                        //收到数据清零
                        ServerMonitor.ServerSendCount = 0;
RestartService/RestartService/bin/Debug/RestartService.exe
Binary files differ
RestartService/RestartService/bin/Debug/RestartService.exe.config
@@ -2,23 +2,22 @@
<configuration>
  <appSettings>
    <add key="RunAfter" value="MSMQ"/>
    <add key="Servers" value="Server,FtpServer,陈贵军特殊服务器,PushServer,清理工具"/>
    <add key="Server" value="D:\Servers\GateWayServer\Server.exe"/>
    <add key="陈贵军特殊服务器" value="D:\Servers\特殊应用\陈贵军\陈贵军特殊服务器.exe"/>
    <add key="FtpServer" value="D:\Servers\FtpServer\FtpServer.exe"/>
    <add key="PushServer" value="D:\Servers\PushServer\PushServer.exe"/>
    <add key="清理工具" value="D:\FTP\清理工具\清理工具.exe"/>
    <add key="Servers" value="Server,MQTTPush,MQTTPenetrate"/>
    <add key="Server" value="D:\Server(New)\Server.exe"/>
    <add key="MQTTPush" value="D:\MQTTPush\MQTTPush.exe"/>
    <add key="MQTTPenetrate" value="D:\MQTTPenetrate\MQTTPenetrate.exe"/>
    <add key="ServerIp" value="118.31.3.103"/>
    <add key="ApplicationAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="http://iot.hdlcontrol.com:8888/hdl-support-monitor/api/alarm/alarmPush"/>
    <add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>
    <add key="ApplicationAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <!--<add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>-->
    <add key="AppKey" value="HDL-HOME-APP-TEST"/>
    <add key="SecretKey" value="WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"/>
    <add key="EmqClientUrl" value="http://15.185.137.39:8081/api/v4/clients/ForeignPenetrateService"/>
    <add key="EmqPushUrl" value="http://15.185.137.39:8081/api/v4/clients/ForeignPenetrateService1"/>
    <add key="EmqAuthToken" value="Basic MmY1ZjEyZmVkYzFlOk16QTVPREE1TURrM056a3pNemt3TWpnMk9EZ3dORGt4TnpJeU1EWTBOVEkzTXpH"/>
    
  </appSettings>
RestartService/RestartService/bin/Debug/RestartService.pdb
Binary files differ
RestartService/RestartService/bin/Debug/RestartService.vshost.exe.manifest
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>
RestartService/RestartService/bin/Release/RestartService.exe
Binary files differ
RestartService/RestartService/bin/Release/RestartService.exe.config
@@ -10,9 +10,9 @@
    <add key="ServerIp" value="118.31.3.103"/>
    <add key="ApplicationAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="http://iot.hdlcontrol.com:8888/hdl-support-monitor/api/alarm/alarmPush"/>
    <add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>
    <add key="ApplicationAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <!--<add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>-->
    <add key="AppKey" value="HDL-HOME-APP-TEST"/>
    <add key="SecretKey" value="WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"/>
RestartService/RestartService/bin/Release/RestartService.pdb
Binary files differ
RestartService/RestartService/bin/Release/RestartService.vshost.exe.config
@@ -10,9 +10,9 @@
    <add key="ServerIp" value="118.31.3.103"/>
    <add key="ApplicationAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="http://iot.hdlcontrol.com:8888/hdl-support-monitor/api/alarm/alarmPush"/>
    <add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>
    <add key="ApplicationAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <add key="WechatAlarm" value="https://china-gateway.hdlcontrol.com/support-monitor/webhook/cloudmonitor/applicationWarn"/>
    <!--<add key="ServiceAlarm" value="https://test-gz.hdlcontrol.com/iot-cloud/webhook/cloudmonitor/supportMonitor"/>-->
    <add key="AppKey" value="HDL-HOME-APP-TEST"/>
    <add key="SecretKey" value="WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"/>
RestartService/RestartService/obj/Debug/RestartService.csproj.GenerateResource.cache
Binary files differ
RestartService/RestartService/obj/Debug/RestartService.csprojResolveAssemblyReference.cache
Binary files differ
RestartService/RestartService/obj/Debug/RestartService.exe
Binary files differ
RestartService/RestartService/obj/Debug/RestartService.pdb
Binary files differ
RestartService/RestartService/obj/Release/RestartService.csproj.FileListAbsolute.txt
@@ -17,4 +17,3 @@
E:\公司项目\服务器代码\服务器监控程序\RestartService\RestartService\RestartService\obj\Release\RestartService.c.resources
E:\公司项目\服务器代码\服务器监控程序\RestartService\RestartService\RestartService\obj\Release\RestartService.csproj.GenerateResource.Cache
E:\公司项目\服务器代码\服务器监控程序\RestartService\RestartService\RestartService\obj\Release\RestartService.RestartService.resources
E:\公司项目\服务器代码\服务器监控程序\RestartService\RestartService\RestartService\obj\Release\RestartService.csprojResolveAssemblyReference.cache
RestartService/RestartService/obj/Release/RestartService.csproj.GenerateResource.cache
Binary files differ
RestartService/RestartService/obj/Release/RestartService.csprojResolveAssemblyReference.cache
Binary files differ
RestartService/RestartService/obj/Release/RestartService.exe
Binary files differ
RestartService/RestartService/obj/Release/RestartService.pdb
Binary files differ