Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Directory on another machine - Login credentials

My application needs to access files on a remote machine that requires a username and password for accessing it.

I'm trying to find out if a directory exists (using Directory.Exists) to verify I can make the 'connection.

Is there a way to supply the username and password when working with remote directories? Currently Exists returns false.

Cheers,

like image 400
adamwtiko Avatar asked Jun 17 '10 10:06

adamwtiko


1 Answers

Unfortunately not. You will need to wrap your code using extra code to handle impersonation of a user that does have access.

This article explains how to do it in code further down the page.

like image 51
starskythehutch Avatar answered Sep 20 '22 10:09

starskythehutch