?
Solved

How to programatically log on to remote machine?

Posted on 2007-10-10
3
Medium Priority
?
1,652 Views
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 !
0
Comment
Question by:photowhiz
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Bradley Haynes
ID: 20052958
0
 
LVL 8

Accepted Solution

by:
Bradley Haynes earned 2000 total points
ID: 20052967
I am also thinking you have a permissions issue . . . check out:
http://msdn2.microsoft.com/en-us/library/0d005ted(VS.80).aspx
0
 
LVL 7

Author Comment

by:photowhiz
ID: 20062170
you are quite correct --- it was permissions.   thanks !
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 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