Network drive from Windows service

  • Thread starter Thread starter Brecht Yperman
  • Start date Start date
B

Brecht Yperman

Hi,

I am running a .NET application as a Windows Service.
In that application I create a FileSystemWatcher.

I want it to watch a network drive which maps to an IBM iSeries IFS
directory. Every time I log in, I have to retype the password to connect
to that network drive, so it isn't stored and thus the service cannot
connect to the network drive.

How can I make the FileSystemWatcher watch that network drive? Is there
any way to provide a user/pass combination of some sort?

Thanks,
Brecht
 
John said:
Your service installer should allow you to install the service with a named
user account, as long as thats a domain account it should be able to connect
to and watch a network drive share under that users credentials.

Well, that's the problem: most iSeries's aren't aware of domains. So
most of the time you have a different password on the iSeries then on
your domain.

I guess we'll have to use unmanaged libraries (mpr.dll).

Brecht
 
Back
Top