Logon Failure

  • Thread starter Thread starter Scott Wallace
  • Start date Start date
S

Scott Wallace

I am trying to access a remote machine's files and can't figure out how to
impersonate a user with rights to perform the task. The program runs as a
Windows Service - this is NOT ASP, IIS, Web Service, etc. related - strictly
a Windows Service. The remote machine is on a different domain so I cannot
set my service to run as that user (same would apply to Web Service). How
can I access a remote share if I know the user and password? Mapped drives
are not an option - there are about 80 remote machines that I need to talk
to.

Thanks,
Scott
 
Providing you will only be using one user at a time, you can use the WNet*
api's (e.g. WNetAddConnection2) to browse and access remote servers.

Paul
 
Back
Top