FileSystemWatcher Question!

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

Hi All, I am using System.IO.FileSystemWatcher object to monitor a directory
over the network. Problem is if the network drive is brought down & back up
I have to restart the WinService [which has this object] to receive
new/change file notifications.
Is there a smarter of way for the FileSystemWatcher to reestablish
connection when the network is back up and work smoothly?

TIA
 
Rather than using a network drive have you tried using a UNC path to a
shared directory? This seems to be a little more realiable, though overall,
I have not had good success in terms of reliablity using the
FileSystemWatcher over the network. The events don't seem to get fired from
time to time. We ended up using a polling architecture instead...

HTH
 
Will check the UNC.. way, Ya! even I am constructing an alternative solution
of Heartbeat to resolve this issue.

Thanks

MJB said:
Rather than using a network drive have you tried using a UNC path to a
shared directory? This seems to be a little more realiable, though overall,
I have not had good success in terms of reliablity using the
FileSystemWatcher over the network. The events don't seem to get fired from
time to time. We ended up using a polling architecture instead...

HTH


Vai2000 said:
Hi All, I am using System.IO.FileSystemWatcher object to monitor a
directory
over the network. Problem is if the network drive is brought down & back
up
I have to restart the WinService [which has this object] to receive
new/change file notifications.
Is there a smarter of way for the FileSystemWatcher to reestablish
connection when the network is back up and work smoothly?

TIA
 
Back
Top