By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

FileSystemWatcher within Windows service

P: n/a
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!
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

"Adrian" wrote:
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!

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.