当我尝试使用“cablib.extract.extractFiles”方法提取.cab文件时,我得到了以下错误。 我在用 windows server 2003 sp2, .net 2.0, iis 6.0和 cablib.dll版本是8.1.0.0
错误是:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
Line 2205:
Line 2206: string strFilePath = strTmpCabPath + "\\" + strFile;
Line 2207: i_Extract.ExtractFile(strFilePath, strTempDir);
Line 2208:
Line 2209: string XmlPath = Server.MapPath(CCommon.COMMON_RESOURCE_FILE_XML);
Source File: d:\wwwroot\WebPages\FileUpload.aspx.cs Line: 2207
Stack Trace:
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
new(UInt32 ) +0
CUtf7.Encode(CUtf7* , UInt16* u16_In) +232
CExtractT<CExtract>.SetDecryptionKeyW(CExtractT<CExtract>* , UInt16* u16_DecryptKey) +78
CabLib.Extract.ExtractFile(String s_CabFile, String s_Folder) +243
FileUpload.WriteToDatabase(String strFileName, Byte[] arrFileBytes) in d:\wwwroot\WebPages\FileUpload.aspx.cs:2207
FileUpload.FileUploadFunc(String strFilePath, String strFileName, Boolean bOtherDocs) in d:\wwwroot\WebPages\FileUpload.aspx.cs:2530
FileUpload.btnUpload_Click(Object sender, EventArgs e) in d:\wwwroot\WebPages\FileUpload.aspx.cs:982
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618