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?
Unfortunately, the answer to your question is no. Attached I send you the test files. Something I noticed while testing is that the file size is crucial. While small files are loaded correctly, biggest fire the error. Obviously as said before just about xlsx files.
Note: the file that I attached currenty it’s working fine.
I can’t send the file that is failing because the limit for attachments is 200kb. But to achieve the correct test case you can copy and paste until the file reaches 9 mb. That would be the same file that I am getting the error.
Hello,
I will be happy to help you out with this issue.
I have created case # CAS-77416-2KPYW1 for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
I'm not sure. I believe that is all done by the ZipPackage class in the .NET Framework. It might be a bug with that class when unzipping files on a server.
Yeap, this work good for me to in a test context, the problem is when I run on a real enviroment. This portion of code is running on IIS. if you can response one question to me maybe this help me to fine a solution.
When you run the load method at some point the code needs to write on disk to process the Stream?If yes, In which folder?
Thanks for your time.
I could not reproduce this. I took your file and copied and pasted the full set of data until there were 111,936 rows in the worksheet (a file size of 17,762 KB). Then I loaded and re-saved the workbook with our Excel library and everything worked fine. It's probably best if Developer Support helped you out with this. You will be able to send them the full file with the error. I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.