Solved

VB.Net swapping files between machines

Posted on 2016-08-21
6
43 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
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 78

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now