FileSystemWatcher gives invalid path error

A

A.S.

When i use FileSystemWatcher to monitor a local directory
on my machine ,it works fine.But I need to monitor a file
on a different server.So i set
FileSystemWatcher1.path="\\server1\App\Data"

However,this gives ArgumentException:The directory name is
invalid.I tried giving the ip address instead of the
servername ,but got the same error.I also tried mapping to
the directory and giving "H:\App\Data" ,again got the same
error.
The server name etc is correct,if i
type "\\server\App\Data" at the Start->run prompt ,it
opens up the Data Directory.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top