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

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

问题描述

我的应用程序需要访问需要用户名和密码进行访问的远程机器上的文件。

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天全站免登陆