Asp.net 在iframe中显示mht文件

Asp.net 在iframe中显示mht文件,asp.net,asp.net-mvc,iframe,mhtml,Asp.net,Asp.net Mvc,Iframe,Mhtml,我需要在页面的框架中显示存储在zip存档中的mht文件 <iframe src="@Url.Action("LoadInstrucion","Pharmacy", new {id= Model.Instrukciya })"></iframe> 从文件中获取字节数组的操作 public static byte[] LoadInstrucion(string zipFileName) { string zipfilePat

我需要在页面的框架中显示存储在zip存档中的mht文件

  <iframe src="@Url.Action("LoadInstrucion","Pharmacy", new {id= Model.Instrukciya })"></iframe>
从文件中获取字节数组的操作

   public static byte[] LoadInstrucion(string zipFileName)
        {
            string zipfilePath = $@"{HttpContext.Current.Request.PhysicalApplicationPath}Content\inst\{zipFileName}.zip";
            if (File.Exists(zipfilePath))
            {
                using (var zipStream = new FileStream(zipfilePath, FileMode.Open))
                using (var archive = new ZipArchive(zipStream, ZipArchiveMode.Read))
                {
                    if (archive.Entries.Count > 0)
                    {
                        var file = archive.Entries[0];
                        var stream = file.Open();
                        using (var ms = new MemoryStream())
                        {   stream.CopyTo(ms);
                          return  ms.ToArray();
                        }

                    }
                }

            }

            return new byte[0];
         }
如果我导航到Url,我会看到请求的mht文件,但它不会显示在iframe中。在开发人员控制台中,我收到警告:“试图将多部分存档加载到子帧中”

   public static byte[] LoadInstrucion(string zipFileName)
        {
            string zipfilePath = $@"{HttpContext.Current.Request.PhysicalApplicationPath}Content\inst\{zipFileName}.zip";
            if (File.Exists(zipfilePath))
            {
                using (var zipStream = new FileStream(zipfilePath, FileMode.Open))
                using (var archive = new ZipArchive(zipStream, ZipArchiveMode.Read))
                {
                    if (archive.Entries.Count > 0)
                    {
                        var file = archive.Entries[0];
                        var stream = file.Open();
                        using (var ms = new MemoryStream())
                        {   stream.CopyTo(ms);
                          return  ms.ToArray();
                        }

                    }
                }

            }

            return new byte[0];
         }