跨网络的文件访问,凭据,登录用户,模拟 [英] File access across the network, credentials, logonuser, impersonation
问题描述
您好,
我的应用程序同时具有服务器和客户端......客户端可以存在于任何计算机上。
I have an application that has both a server and client... the client can exist on any computer.
我需要允许客户端导出一组文件。将导出作业的服务器进程作为本地系统帐户运行。
I have a need to allow a client to export a set of files. The server process that will be exporting the job runs as the Local System account.
当我想将资源导出到远程UNC时,例如 \\servername \ share 我想提示我的用户提供凭据。
When I want to export resources to a remote UNC such as \\servername\share that I don't have permission on I would like to prompt my user for credentials.
如何然后我使用这些新凭据进行身份验证,然后使用System.IO.File.Copy(src,dst)?
How do I then use these new credentials to authenticate and then System.IO.File.Copy(src,dst)?
我发现了几篇关于模仿的文章,我可以冒充本地用户,但似乎不是远程用户...
I've found several articles on impersonation and I can impersonate a local user, but not a remote user it seems...
我'用C#编程。
谢谢,迈克
推荐答案
< font face = Arial size = 2>我想做同样的事情。是否没有.NET方法在UNC网络共享上进行身份验证? System.Net.NetworkCredential仅适用于网络身份验证吗?
这似乎是一个非常常见的服务这应该在.NET命名空间中有一个简单的答案...
This seems like a very common senario that should have a simple answer in the .NET namespace...
任何人?
谢谢,
Brad
这篇关于跨网络的文件访问,凭据,登录用户,模拟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!