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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top