寻求一个remoting传文件到服务端以及从服务端获取文件的源代码.

解决方案 »

  1.   

    参考
    http://blog.csdn.net/yyyb/archive/2005/04/22/358193.aspx
    http://developer.51cto.com/art/200603/22440.htm
      

  2.   

    其实就是把文件转成2进制流,在客户端和服务端之间进行传输
    把指定路径文件转成流的方法public byte[] ReadFile(string filePath)
    {
        FileInfo fileinfo = new FileInfo(filePath);
     
        BufferedStream inStream = new BufferedStream(new FileStream(filePath, FileMode.Open));
        byte []buf = new byte[fileinfo.Length];
        inStream.Read(buf, 0, (int)fileinfo.Length);
     
        inStream.Close();
        return buf;
    }