使用Windows凭证进行FTP登录 [英] FTP Login using Windows Credentials
问题描述
我们有一个C#windows应用程序,它需要能够连接到网络上的服务器,下载并保存文件到指定的位置。
我们不能使用Web服务,因为我们不能认为我们的客户端的服务器上会有IIS。
我正在考虑这样做的方式是将FTP传输到服务器上并下载文件。我可以写代码连接到服务器并找到文件,但我有两个问题。
-
有没有一种方法可以将Windows凭据用于FTP到远程服务器上? (我知道我无法直接获取用户的密码)。
-
有没有更好的方式从ftp服务器获取文件它?
感谢您的建议。
取决于文件的大小(例如,如果它小于4MB) - 您可能会考虑利用公共MSMQ机制。
We have a C# windows application that needs to be able to connect to a server on a network, download and save a file to a specified location. We can not use a web service as we can not assume that our clients will have IIS on their server.
The way that I am considering doing it is to FTP onto the server and download the file. I can write the code to connect to the server and located the file but I have 2 questions.
Is there a way of using the windows credentials to FTP on to the remote server? (I understand that I cannot directly get the user's password).
Is there a better way of getting the file from a server other than ftp-ing on to it?
Thanks for the advice.
Depending on the size of the file (e.g. if it is less than 4MB) - you might consider leveraging a public MSMQ mechanism.
这篇关于使用Windows凭证进行FTP登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!