简体   繁体   中英

Windows service stopped after first event

I created a windows service with a filesystemwatcher that monitor a path and fire when a text file created on the path. it works only one time and then stopped withv an unhandled error. i used try/catch but nothing happened. in event viewer it returns 1026,1000 and 1001 as eventId. it returns an error that its type is CLR20r3 and response is Not available.

You can change your app so that it can be started as console app , so that it can be easily debugged from Visual Studio.

As your service is dealing with files, one of the possible problems is that the user which is runnong the service doesn't have enough permissions on the file system. You should check this. If this is the problem, the app run as console app could work perfectly, and it could fial when running as a service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM