Vb.net Send File Over Network

Vb.net Send File Over Network Rating: 6,9/10 1243 votes
  1. Write Text File Vb
  2. Vb File Type
Active2 years, 7 months ago
Network

This depends what you mean by network - if you're copying on a local network you can just use the file copy operations inside System.IO. If you're wanting to send to remote servers I do this using web services. I compress byte arrays and send them over and decompress on the remote side. The byte array is super easy to write back to disk using.

I know similar questions like this have been asked on various forums, however none of the given solutions have worked for me, and was wondering if anyone had any other pointers they could give. I am basically trying to send a file (an image) over TCP between 2 computers on the same network. I have been trying to convert the image to a byte array, then to a string before sending the string. On the other side, I have received the string, converted to a byte array, and then convert back to an image. However, on the receiving side, the string is empty so I am getting an error when I then convert that to a byte array.

The code for the sending side is:

And then the receiving side:

Thanks in advance for any help you can give! Lg flash tool keygen mac download.

crazyloonybincrazyloonybin
7082 gold badges12 silver badges29 bronze badges

Write Text File Vb

2 Answers

Not sure if is the necessarily problem here, but I would suggest converting the bytes to string using System.Convert.ToBase64String(byte_array)This will always give a safe string with no awkward characters which can be transmitted in various ways.

Stuart WhitehouseStuart Whitehouse
Brandon Minnick
7,47612 gold badges32 silver badges83 bronze badges
user7515648user7515648

Vb File Type

Not the answer you're looking for? Browse other questions tagged vb.nettcp or ask your own question.