Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FileSystemWatcher not work in Window services
Message
 
To
29/02/2004 00:34:21
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00881850
Message ID:
00882552
Views:
29
John,

This could be due to the security context in which your service runs as opposed to YOUR security permissions as you are logged into your computer(you probably have local administrative rights to your computer). Have you tried changing the account the service runs under? Do you have any logging built into your service that could check for permissions to any folders it should be watching prior to actually trying to watch and manipulate files? It could be that your watcher is finding the files just fine, but the rest of your code can't manipulate them.

I would try to wrap the potential problem area and log to an event log whatever exceptions might be thrown during these processes.

regards,

JE

>Hi,
>I have a simple window services that check any new file created in c:\myfolder. If any, extract the text and do some processing. After it, delete the file.
>
>I use FileSystemWatcher component in my window services and set my window services run auto.
>After I restart my pc, I can see my WinServices run. Then I created a file in my folder. But my file still there after 10 seconds.
>However, it works find if debug my Window Services thru VS.Net->Debug Process.
>
>Any ideas?
>
>Thank you
Previous
Reply
Map
View

Click here to load this message in the networking platform