FileSystemWatcher within Windows service

G

Guest

I am trying to use FileSystemWatcher (FSW) to monitor a folder. The only
problem is this folder is on FTP server located on DMZ (outside my domain)
and FSW does not allow me to pass credentials in order to authenticate on
that folder.
Because of this, I mapped that folder on a computer within the domain.
Now, I was able to build a Windows app using FSW to raise an event whenever
a file was placed on FTP folder and it worked OK.
The problem is when I tried to do the same thing in a Windows Service
application I am getting the following error: "The directory name
P:\ftproot\Folder is invalid.".
Is there anything I am doing wrong and if not is there another way to listen
to an FTP folder?

Thanks in advance!
 
G

Guest

You cannot use a mapped drive when using a windows service, the service has
to run with no user context a mapped drive is setup when a user logs in, try
using a network share.
 

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