How to programatically log on to remote machine?

Posted on 2007-10-10
Last Modified: 2013-11-07
I'm trying to log on to a machine in a different domain.  Basically, I need to be able to hit the filesystem to copy some files over.  Assuming I already have the credentials {domain, username, pwd}, and that user already has write permission for the target folder, how can I log on in code? (win XP, .net 1.1 or 2.0)

note: I've already tried LogonUser via p/invoke without success... as it says in the official docs: "You cannot use LogonUser to log on to a remote computer."  alas.

thanks !
Question by:photowhiz
    LVL 8

    Expert Comment

    by:Bradley Haynes
    LVL 8

    Accepted Solution

    I am also thinking you have a permissions issue . . . check out:
    LVL 7

    Author Comment

    you are quite correct --- it was permissions.   thanks !

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now