代码如下:
byte[] bytContent =  _cwsDoc.GetDocContent(sDocGuid);
Response.ContentType = "message/rfc822";
Response.BinaryWrite(bytContent);
-----------------
_cwsDoc.GetDocContent(sDocGuid);是从一个text字段中读出数据
执行上面的代码有的机器很显示正常,有的机器显示不了
text字段中存放的是mht格式的文件内容,这是不是跟IE的安全设置有关呢?
还有没有其它的读取方法?

解决方案 »

  1.   

    Response.ContentType = "message/rfc822";
    你这个是什么格式?
    如果可能,你把这段注释掉看看会不会显示?
      

  2.   

    去掉 Response.ContentType = "message/rfc822" 是可以显示出来,但显示的格式全乱了
      

  3.   

    message/rfc822 是mht、mhtml文件格式MIME类型
    你的代码在显示不了的机器上是否报错,执行前最好用try块或if判断一下
    if (Response.ContentType != "Text/HTML")
    {
        .........
    }
      

  4.   

    if (Response.ContentType != "message/rfc822")
    {
        .........
    }
      

  5.   

    Response.ContentEncoding = "gb2312";
      

  6.   

    Response.ContentEncoding = "gb2312";编译都通不过