操作过程客户端发送请求到---getapi.aspx----getapi.aspx.cs 中反射出程序集的方法。请求的数据是stream stream对象传到程序集。。保存下来。大小都一样。但是Flash内容是空白。
我试了下把程序集里的代码复制出来。上传Flash就没问题。。
大家帮我想想是什么原因。

解决方案 »

  1.   

    是这样。我重新测试下了。
    System.IO.Stream stream = Request.Files["stream"].InputStream;
    array.Add(stream);                  //
    Stream streams = (Stream)array[2];  //问题出在这二句。我放在ArrayList数组里然后取出来再存,就出问题。。去掉就出问题了
    FileStream fs = new FileStream(System.Web.HttpContext.Current.Request.PhysicalApplicationPath                    + "/images/zhengfujie.swf", FileMode.Create, FileAccess.Write);
    byte[] buffer = new Byte[checked((uint)Math.Min(4096, (int)streams.Length))];
    BinaryReader reader = new BinaryReader(streams);
    string flashMark = new string(reader.ReadChars(3));
    int bytesRead = 0;
    while ((bytesRead = streams.Read(buffer, 0, buffer.Length)) != 0)
    fs.Write(buffer, 0, bytesRead);
     reader.Close();
    fs.Dispose();
    fs.Close();
     Response.End();