views:

43

answers:

3

I need to automatically transfer an xml file from server A over internet to a server B. Ftp works fine, but should I be use a message queue instead?

It should be secure in the order that I won't lose messages and be able to log what is transferred.

+2  A: 

Use sftp whenever possible.

halfdan
A: 

Use a POST over HTTPS - an implementation is available on every imaginable platform.

Of course, you need to check certificate validity, but this is also a part of the protocol itself; your part is to keep the certificates correct and secure.

Piskvor
Unfortunately server B (the client machine) won't allow any http or https connections.
Makach
+2  A: 

You could use a message queue as well but not to transfer the files, just for keeping a queue of the files to be transferred. Then you can write a Service who uses sftp, https, ssh, or whatever other secure method to transfer the files. There are plenty of options. A common scenario to use is: - Write a file to a given folder and a message to the message queue. - The web service will be polling the message queue who will have a message with the filename to be transferred. If there is a file, use SECURE METHOD CHOSEN (see the links below), and do the transfer.

Well, you could simply avoid using message queue and use a secure client to connect to the server B from server A and do the transfer, here are some links that can help you:

http://stackoverflow.com/questions/86458/how-do-i-upload-a-file-to-an-sftp-server-in-c-net

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/bee2ae55-5558-4c5d-9b5c-fe3c17e3a190

http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/f5d22700-552f-4214-81f5-fa43bfcc723d

Hope that helps

Ramon Araujo
It did :) thank you:)
Makach