473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

FileSystemWatcher and Windows Service

I have created a FileSystemWatcher application that monitors a set of folder
for changes. This works well as a windows app. I have copied the code from
the windows app to a windows service and now there are problems.

If I perform add/chg/del in the folder, the windows app captures all changes
(actually to a degree that I did not know happened - ie. 4 events for an add
of a file).

The windows service though will not pick up add's to the folder. I am
writing to the event log (my own) to show changes and those changes are
being logged to a SQL Server as well.

Are there problems with FileSystemWatcher and windows services? The routine
that writes the event log entries is used for all three events
(add/chg/del).

This is being tested on a windows xp pro workstation.

LLoyd Sheen
Jul 21 '05 #1
0 1290

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rich Miller | last post by:
Previously posted on the VB newsgroup with no replies, so any ideas appreciated. I have written a service application in VB (VS.Net 2003). On start, the service creates an object that...
3
by: Craig Thompson | last post by:
I've attempted to write a windows service that creates one FileSystemWatcher for each entry in a XML config file. Everything start perfrectly and runs as I expect for about 5 minutes and then...
2
by: Jet Leung | last post by:
Hi all, I had made a program to watching files in my directory. I had used a instance of FileSystemWatcher to do my work.And I had add some events of the FileSystemWatcher , for example onChange,...
2
by: Bonnett | last post by:
I have made a simple console application that creates a webpage from my playlist, then uploads it to my webhost. I decided to convert it to a windows service and use the FileSystemWatcher to...
1
by: Phil396 | last post by:
I have a windows service that uses a filesystemwatcher to wait for files and process them to a database. Sometimes a large group of files will be cut and paste for the filesystemwatcher to...
2
by: Sacha Korell | last post by:
I need to set up a FileSystemWatcher in my web application (to automatically process uploaded files) and I'm trying to decide where to set it up. I would like to keep it within the web app, but it...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
0
by: Rich Miller | last post by:
Any ideas appreciated. I have written a service application in VB (VS.Net 2003). On start, the service creates an object that instantiates a System.IO.FileSystemWatcher like so (the _watcher is...
1
by: D2 | last post by:
Hi, We are using FileSystemWatcher class in a windows service to monitor a directory "d:\abc". This path is configured in a config file. When the service is running and FSW is watching this...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.