C# 利用SharpZipLib对*.rar压缩文件解压报错


C# 利用SharpZipLib对*.rar文件解压报错

问题描述

C#使用SharpZipLib对*.rar文件进行解压的时候出现错误

ICSharpCode.SharpZipLib.Zip.ZipException
  HResult=0x80131500
  Message=Wrong Local header signature: 0x21726152
  Source=ICSharpCode.SharpZipLib
  StackTrace:
   在 ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()
   在 YESCMS.Areas.Admin.Controllers.SiteManageController.doUpdate() 在 E:\GZ\GZBlog\YESCMS\Areas\Admin\Controllers\SiteManageController.cs 中: 第 274 行
   在 Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   在 Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<<InvokeActionMethodAsync>g__Logged|12_1>d.MoveNext()
 

错误代码截图

C# 利用SharpZipLib对*.rar文件解压报错

原因

C#使用SharpZipLib对.rar文件进行 解压的时候,就会报这个错误,把.rar改成zip文件就行了

 

版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
管理员
上一篇:C#使用SharpZipLib进行压缩文件(*.rar,*.zip)操作,压缩和解压
下一篇:C#HTTP请求RestSharp.RestClient发起https请求报错
评论列表

发表评论

评论内容
昵称:

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码