Solved

VB.Net swapping files between machines

Posted on 2016-08-21
6
59 Views
Last Modified: 2016-08-23
Hi Experts
I need to send a file from a server to a client machine, have the client act on the contents of the file and send a result back to the server as another file.
I looked at named pipes but this seemed overly complicated for such a simple task.
I also looked at sockets but this seemed to require that the client was also a socket server to swap files in both directions.
Anyone got an idea for the simplest way to do this and an example?
Many thanks in advance
0
Comment
Question by:PNRT
[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
6 Comments
 
LVL 84
ID: 41764351
When you say "have the client act on the file", do you have to execute that action? Or is it something the client would do automatically?

Are the machines on the same network? Or would the client have to "download" the file, or something of that nature?
0
 
LVL 2

Author Comment

by:PNRT
ID: 41764374
Hi
Thanks for the reply
The client would have to carry out instructions based on the file content.   Create a response file and then send that response file back.

To be honest it wouldn't even have to be a file, just a string of instructions.  I just thought a file might ne easier

The client would be on the same network but not necessarily on the same subnet.

Thanks again
0
 
LVL 80

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 250 total points
ID: 41764474
They have to connect somehow.. From what I gather what you want is the customer to connect to the data source. Do Stuff, Send a response.  

One way is to code a service, the client connects to the service, pulls their data with a get request, do stuff, post their result using a set.  This requires IIS to be on the server machine and coding a WCF service. Are we talking kilobytes or megabytes of data to be transferred?

you could open up file and printer sharing firewall on the 'server' to allow from 10.0.0.1 - 10.255.255.255 but the client would need to setup routing to route to your server's ip within the LAN without going out the gateway.  This way it is simple SMB sharing.  This requires doing a bit of plumbing.

You haven't stated how the client will be processing the data.. within the client portion of your app or in a separate app? Do they really need a 'file' download and a way of sending the new 'file'?

they could simply have a client app that connects to your SQL server database, pull the needed records, do stuff, send results to a table.
0
Technology Partners: 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!

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 41764538
@David Johnson
This requires IIS to be on the server machine and coding a WCF service.
Errr, not really. One could use Katana and its components.
0
 
LVL 2

Author Comment

by:PNRT
ID: 41764540
Thanks all for the responses
I was rather hoping for something closer to the sockets solution as if would be less effort than setting up IIS?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 41764573
Sockets are messy because you have to write your own protocol on top of them. I would look into Katana, or self-hosting a WCF service (there's plenty of articles on that topic on the web).
0

Featured Post

Industry Leaders: 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

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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