FTP login using Windows credentials

We have a Windows C # application that should be able to connect to a server on the network, download and save the file to the specified location. We cannot use the web service, as we cannot assume that our customers will have IIS on their server.

What I plan to do is FTP to the server and upload the file. I can write code to connect to the server and find the file, but I have 2 questions.

  • Is there a way to use Windows credentials for FTP on a remote server? (I understand that I cannot directly get the user password).

  • Is there a better way to get a file from a server other than ftp-ing?

Thanks for the advice.

+1
source share
2 answers

I assume that a network resource is not an option (perhaps an external site, etc.).

Please note that IIS is not the only way to host a web service. With WCF, you can use the exe console or the Windows service to host the WCF service, which allows you to run WCF on the server without mentioning IIS. See here . Then all you need is a line of sight on the server and some code that returns the file (or its fragments or stream).

+1
source

Depending on the size of the file (for example, if it is less than 4 MB), you can use the public MSMQ mechanism.

+1
source

Source: https://habr.com/ru/post/1341824/


All Articles