Logon Failure

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
 
P

Paul Todd

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
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top