[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register 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
?
662 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
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!
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 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