我使用 DotNetZip。
我收到错误
无法对不可搜索的输入流使用 PKZIP 加密
该怎么办
var outputStream = new MemoryStream();
using (var zip = new ZipFile())
{
zip.Password = "123456!";
var outputStreamFile = new MemoryStream();
var userId = m_userRepository.GetuserByLogin(this.User.Identity.Name).UserId;
using (var streamWriter = new StreamWriter(outputStreamFile))
{
streamWriter.WriteLine(m_kamikaze2Repository.GetGameById(gameId, userId).Result);
}
zip.AddEntry("result_" + gameId, outputStreamFile);
zip.Save(outputStream);//error
}