Hi,
I'm getting an error ( Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) when I try to run the load method of the Workbook class.
Esenario
Parametro: Stream
FileType: XLSX (This only happend whit xlsx files with xls work fine.)
Context: Remote
Let me knowl if more info is needed.
Error description:
Timestamp: 11/10/2011 3:51:03 PM
Message: HandlingInstanceID: 078a9861-c57e-427d-9e59-b8346e4e8cd1
An exception of type 'System.ApplicationException' occurred and was caught.
---------------------------------------------------------------------------
11/10/2011 08:51:03
Type : System.ApplicationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Source : mscorlib
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.String nGetRootDir(System.IO.IsolatedStorage.IsolatedStorageScope)
Stack Trace :
Server stack trace:
at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder.GetCurrentStore()
at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder..ctor()
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.EnsureIsolatedStoreStream()
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.DeflateEmulationTransform.Decompress(Stream source, Stream sink)
at MS.Internal.IO.Packaging.CompressEmulationStream..ctor(Stream baseStream, Stream tempStream, Int64 position, IDeflateTransform transformer)
at MS.Internal.IO.Packaging.CompressStream.ChangeMode(Mode newMode)
at MS.Internal.IO.Packaging.CompressStream.Seek(Int64 offset, SeekOrigin origin)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Seek(Int64 offset, SeekOrigin origin)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Xml.XmlTextReaderImpl.InitStreamInput(Uri baseUri, String baseUriStr, Stream stream, Byte[] bytes, Int32 byteCount, Encoding encoding)
at System.Xml.XmlTextReaderImpl.InitStreamInput(Stream stream, Encoding encoding)
at System.Xml.XmlTextReaderImpl..ctor(String url, Stream input, XmlNameTable nt)
at System.Xml.XmlTextReaderImpl..ctor(Stream input)
at System.Xml.XmlTextReader..ctor(Stream input)
at Infragistics.Documents.Excel.Serialization.Excel2007.ExcelXmlDocument..ctor(Stream contentTypeStream, Boolean isForLoading)
at Infragistics.Documents.Excel.Serialization.Excel2007.XmlContentTypeBase.Load(Excel2007WorkbookSerializationManager manager, Stream contentTypeStream)
at Infragistics.Documents.Excel.Serialization.Excel2007.XLSX.ContentTypes.WorksheetPart.Load(Excel2007WorkbookSerializationManager manager, Stream contentTypeStream)
at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPart(IPackagePart part)
at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPartRelationships(IEnumerable'1 relationships, ContentTypeBase contentType)
at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadWorkbookContents()
at Infragistics.Documents.Excel.Serialization.WorkbookSerializationManager.Load()
at Infragistics.Documents.Excel.Workbook.LoadXLSXFile(Workbook workbook, Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
at Infragistics.Documents.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
at Infragistics.Documents.Excel.Workbook.Load(Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml)
at Infragistics.Documents.Excel.Workbook.Load(Stream stream)
Is it possible this is a first chance exception you are seeing while debugging in VS? If so, it is not a problem. I have seen these types of errors with the built in zip support before and if you let it run, it will still work correctly. If not, it might be a bug. Would you be able to attach the file you are trying to load?