473,395 Members | 1,756 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,395 software developers and data experts.

Help: FileSystemWatcher weird problem!

Hello,

I have some weird problem with the FileSystemWatcher. I have developed
an application that monitors a network directory for file changes of a
certain file type. The program runs well for a week. Then suddenly the
monitored network server starts to behave crazily. It sends to my Sync
Server dozens of replicated file change events. Say one file was
changed two days ago, but the monitored server still keeps sending me
many many events of that file. It sends me 9000 events in a minutes
and keeps sending me so many events hour by hour. This drives me
crazy!! Our network server is a Windows 2000 Server. It's a important
server that many people here need to access it and modify files on the
monitored directory.

Why that network server keeps sending me false 'file change' event? Is
that some kind of worm? What windows service does FileSystemWatcher
events rely on? I have check the event log, but it doesn't help much.
Please help! THANKS.

Here is some code in my application. I don't think my code have some
problem, because the server can run for serveral days without any
problem. The problem is my sync server got toooo many false events!!

--------------------------
watcher.Path = srcdir; // monitored network directory
watcher.Filter=filetype; //certain file type such as"*.doc"
watcher.IncludeSubdirectories = true;
watcher.NotifyFilter =
NotifyFilters.FileName|NotifyFilters.LastWrite|Not ifyFilters.DirectoryName|NotifyFilters.Size;
watcher.InternalBufferSize=8192*8;

// Setup event handlers
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnDeleted);
watcher.Renamed += new RenamedEventHandler(OnRenamed);
watcher.Error += new ErrorEventHandler(OnError);

// Enable the FileSystemWatcher to notify events
watcher.EnableRaisingEvents = true;
Jul 19 '05 #1
0 2953

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

Similar topics

13
by: David | last post by:
I have been working on trying to write a directory watcher service. One of the requirments is that it be able to watch multiple directories, not sub directories of one parent directory, but just...
3
by: Stampede | last post by:
Hi, I write an application which waits for incomming files in a specified directory. I thought, that using the FileSystemWatcher would be the best, as it does exactly what I need. But now I have...
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...
1
by: PadovaBoy | last post by:
Hi! I try to develop a simple system for monitoring a sub directory of a web site and remake an xml file every time a sub-dir change it's name. I don't wont to use a window.service because, i want...
2
by: kmcnet | last post by:
Hello Everyone and thanks for your help in advance. I have been battling a problem for nearly a month with the FileSystemWatcher component. Basically, what I am trying to do it to monitor three...
0
by: cxw0106 | last post by:
Hello, I have some weird problem with the FileSystemWatcher. I have developed an application that monitors a network directory for file changes of a certain file type. The program runs well for...
2
by: Ian Toltz | last post by:
I've got a form element (a wizard, actually) which is giving me problems when I try to invoke some of its methods from one of the methods of a filesystemwatcher. Basically the watcher sits there...
5
by: =?Utf-8?B?Sm9obiBT?= | last post by:
I am trying to find out if there is a way to tell if there is already a filesystemwatcher (created by a webservice) monitoring a folder. I have a webservice that creates a filesystemwatcher,...
3
by: pantagruel | last post by:
Hi, the following: FileSystemWatcher watcher = new FileSystemWatcher(); RenderingQ = ConfigurationSettings.AppSettings; //RenderingQ = "C:\\RenditionServerQ\\InjectorQ\\OnDemandQ";...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.