System description
A layout component that uses OOXML to create a document.
The build component consists of several parts. All parts are written in C ++ as exe + dll, with the exception of the interface to the OOXML document. The last 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 tool for working with OOXML documents.
We create a document from an OOXML template document where certain bits and pieces are replaced by their actual contents.
One of these bits is the OLE Server component. This is basically a binary segment in an OOXML file. Packaging is apparently using isolated storage to write this binary segment.
Problem
Recording a segment> 8MB causes the exception "Unable to determine the identity of the domain" is thrown.
On the C ++ side, this exception contains the ISS_E_ISOSTORE error (0x80131450).
We analyzed this, and as far as we can tell, this is a security feature that prevents the complete damage of a non-unreliable third-party component by creating huge files.
Then we tried a lot of things in the .NET / COM component (creating custom AppDomains, setting attributes for maximum validity, creating our own threads and passing them to the Packaging component), but every time that led to the same exception being thrown.
What can we do to make this work?
Could it be that when a .NET component is created as a COM component, its AppDomain is always untrusted?
QBziZ
source share