目录另一台机器上 - 的登录凭据 [英] Directory on another machine - Login credentials

查看:165
本文介绍了目录另一台机器上 - 的登录凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要访问需要访问它的用户名和密码在远程计算机上的文件。

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

我试图找出是否存在的目录(使用Directory.Exists)来验证我可以使'连接。

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

是否与远程目录时提供的用户名和密码的方法吗?当前存在返回false。

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

干杯,

推荐答案

可惜不是。您将需要使用额外的代码来处理确实有访问权限的用户的模拟来包装你的代码。

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.

这篇关于目录另一台机器上 - 的登录凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆