[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Best way to get files from Unix/Linux share to Windows Server (Programatically within .Net application)

Posted on 2009-04-07
4
Medium Priority
?
664 Views
Last Modified: 2013-12-17
Hi all,
Thanks for looking this post. My question is:
What's the Best/Reliable/Easy way to get files from Unix/Linux share to Windows(Programatically within .Net application)? I need to create an application/service that runs continuously to watch for that unix/linux share and get files. Currently, I have a .net code that maps Unix/Linus share as a network drive on Windows Server with userid impersonation and gets files on Windows Server and then disconnect mapped share.  That works fine. But, it has overheads of mapping network drive at runtime and then disconnect after it's done.
Is there any better way to do this Programatically within .Net application?
0
Comment
Question by:chinawal
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:spprivate
spprivate earned 225 total points
ID: 24092770
another way to do is (what we did) was to use ftp.So set up the share as ftp and download from ftp.
Even couple of MSDN sites also suggest to use ftpwebrequest
0
 
LVL 5

Author Comment

by:chinawal
ID: 24097151
Thanks for advice. Unfortunately, the unix/linux box is out of my control. I may not be able to get it setup as FTP.
0
 
LVL 2

Accepted Solution

by:
raffraffraff earned 525 total points
ID: 24098726
I think what you're asking is "Does .NET have any built-in functionality for polling Unix boxes that don't have SAMBA running on them?" I doubt it, but I'm ready to be proven wrong. Microsoft released Windows Services For Unix for free, but I'm not sure if any of it is exposed through the .NET framework.

You could use SFU or GnuWin32 to speak natively to the Unix box, but you would have to run their .exe files the same way you'd use any DOS-like .exe file in .NET. It may be a little clunky, but essentially, armed with an ssh account on the Unix box, you could run an 'expect' script to list the remote directory contents and based on the results, you could run a second expect script to copy the files to the WIndows side.

If this sounds like it might work, let me know and I'll elaborate if I can. Otherwise, couldn't you just leave the Unix share mapped on the Windows box to avoid the overhead of mapping / disconnecting each time?
0
 
LVL 5

Author Comment

by:chinawal
ID: 24099387
I think, that share is a SAMABA share. I am not 100% sure. Since I am able to access it from Windows, doesn't it indicate that it has Samba and I read somewhere that it's a samba? (this server is out of my control).
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question