Problem using large binary segment in OOXML

7

System Description

A plotting component that uses OOXML to generate a document.

Plotting component consists of several parts. All parts are written in C++ as exe + dll's, with the exception of the interface to the OOXML document. The latter component is a COM component that was created in C#/.NET. The main reason for this is that the .NET framework contains System.IO.Packaging. This is a very handy built-in facility for dealing with OOXML documents.

We create a document out of a template OOXML document where certain bits and pieces are replaced by their actual content.

One of these bits is an OLE Server component. Basically this is a binary segment within the OOXML file. For writing this binary segment, the Packaging component apparently uses isolated storage.

Problem

Writing a segment > 8MB results in an exception being thrown "Unable to determine the identity of the domain".

On the C++ side this exception contains the error ISS_E_ISOSTORE ( 0x80131450 ).

We have analyzed this and as far as we can tell, this is a security feature that prevents semi-untrusted third-party component from completely ruining your HD by writing immense files.

We have then tried a lot of things in the .NET/COM component ( creating custom AppDomains, setting Attributes for maximum permissivity, Creating our own Streams and passing those to the Packaging component ) but every time it resulted in the same exception being thrown.

What could we do to make this work?

Could it be that when the .NET component is instantiated as a COM component, its AppDomain is alway untrusted?

c#
.net
c++
com
openxml
asked on Stack Overflow Sep 29, 2008 by QBziZ • edited Sep 29, 2008 by QBziZ

2 Answers

2

You might try to unzip the package yourself (instead of using the .NET package API), write directly to the file which represents the binary segment and zip it again.

answered on Stack Overflow Oct 6, 2008 by elbandido
1

You should change the title of that question since your problem is not OOXML related.

Other than that: what system are you working on that 8MB chunks of data result in the risk of totalling your hard drive?

answered on Stack Overflow Sep 29, 2008 by xmjx

User contributions licensed under CC BY-SA 3.0