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

FileSystemWatcher within Windows service

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
1 1615
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rich Miller | last post by:
Previously posted on the VB newsgroup with no replies, so any ideas appreciated. I have written a service application in VB (VS.Net 2003). On start, the service creates an object that...
3
by: Craig Thompson | last post by:
I've attempted to write a windows service that creates one FileSystemWatcher for each entry in a XML config file. Everything start perfrectly and runs as I expect for about 5 minutes and then...
2
by: Jet Leung | last post by:
Hi all, I had made a program to watching files in my directory. I had used a instance of FileSystemWatcher to do my work.And I had add some events of the FileSystemWatcher , for example onChange,...
2
by: Sacha Korell | last post by:
I need to set up a FileSystemWatcher in my web application (to automatically process uploaded files) and I'm trying to decide where to set it up. I would like to keep it within the web app, but it...
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...
0
by: Rich Miller | last post by:
Any ideas appreciated. I have written a service application in VB (VS.Net 2003). On start, the service creates an object that instantiates a System.IO.FileSystemWatcher like so (the _watcher is...
1
by: chad.poplawski | last post by:
Hi All, I'm working on a Windows Service that uses FileSystemWatcher components to capture and log data when certain actions (such as files being deleted) take place in the file system. I am...
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,...
1
by: D2 | last post by:
Hi, We are using FileSystemWatcher class in a windows service to monitor a directory "d:\abc". This path is configured in a config file. When the service is running and FSW is watching this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.