How do I upload files using remoting?

  • Thread starter Thread starter Karthik D V
  • Start date Start date
Hi Friends,

How do I upload files using remoting?

Thanks

One way to do this is to have a method on the server like:

int Write(string filename, byte[] buf, int fileOffset)

that returns the number of bytes written.

The client then reads the contents of the file to upload and
repeatedly calls the remote Write() method to send the contents to the
server. You can either use -1 as a fileOffset to indicate EOF or have
a separate Close() method.

The .net framework help has a remoting sample that would be a good
starting point. Add the Write() method to the sample remotable
object. See "Programming with the .NET Framework - Accessing objects
in Other Application Domains - .NET Remoting Overview - Building a
Basic .NET Remoting Application"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top