本文介绍了C#Windows服务终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我提供了一项服务,该服务从.xml文件读取需要ping的内容,然后ping该位置.我不明白的是为什么要使服务正常工作,我需要将xml文件放入system32中,否则它将看不到xml文件.

这是我指定xml所在的代码行.

XmlTextReader reader =新的XmlTextReader("C:\\ Program Files \ IDE3 Monitoring Service \ KonfiguracijaKlijenta.xml");

提前tnx

Hi,

I made a service that reads from an .xml file what it needs to ping and then pings that location. What i dont understand is why for service to work i need to put xml file into system32 otherwise it cant see the xml file.

this is the line of code where i specified where the xml resides.

XmlTextReader reader = new XmlTextReader("C:\\Program Files\IDE3 Monitoring Service\KonfiguracijaKlijenta.xml");

tnx in advance

推荐答案




这篇关于C#Windows服务终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 06:35