1、编写服务对应的config文件,

比如我的服务叫ModbusAgent.exe,对应的文件叫ModbusAgent.exe.config

文件内容:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false"/>
  </runtime>
</configuration>

2、配置程序签名

右键项目"属性"-->"签名"新建任意证书

网上说托管资源配置成系统服务需要程序签名

本地程序使用.net framework 4.5,管理员用户组,经过以上配置,服务器启动成功,eventvwr打开日志,程序里就没有错误日志了。

相关文章:

  • 2022-12-23
  • 2021-10-27
  • 2021-08-16
  • 2022-02-21
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-08
  • 2021-11-14
  • 2022-02-10
  • 2021-06-22
相关资源
相似解决方案