Isolated Storage Error When Calling FlexCel

I did search the formums and found no info, also searched the faq, and found the below info which is good in that at least the problem has been identified and analyzed and I get the sense there is a solution, but I need more help and I think a forum answer would also help others. 
 
****** FROM FAQ **********************
http://www.tmssoftware.com/site/flexcelnet.asp?s=faq
Isolated storage Error

When calling FlexCel from COM or Native Code:

You might also get the following Exception:
System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine the identity of domain.
When calling FlexCel from a COM component or a native one. In this case, the problem is most likely that you are missing the "evidence" in the appdomain, as it is not created automatically when calling .NET from COM.

If that is the issue, you can fix it either by creating a new AppDomain with evidence and running the FlexCel code in it, or you might try to patch the current AppDomain to add an evidence.  [Adrian Gallero (May 30, 2011)]
***************************************************************************
I am pretty certain I need to "add an evidence", I'm using .NET 3.5, C#, but I have NO IDEA how to do this.  I found various generic examples from google searches, but nothing I've tried has fixed this problem.  I have a gut feeling the answer is burried in the following link:
http://www.netframeworkdev.com/net-base-class-library/unable-to-determine-the-identity-of-domain-10027.shtml
 
But I'm not smart enough to figure it out, and the code isn't C#.
 
Since this question has been addressed in the FAQ, I'm REALLY hoping you guys have some sample code I can copy to address this problem.
 
For what its worth, when getting the error, it is running in a C# script in an SSIS package, under a domain account with local admin rights.  I just need sample C# code that shows how to do the evidence stuff.  The error only occurs when generating >7MB files as described in the FAQ.
 
Thanks so much for any help!  We just bought flexcel a week or two ago, loved the tool until I hit this wall.

Hi,


You are in luck, just download the latest beta version from the registered users page, and it should fix it.

We got feed up with this isolated storage error, so we rewrote all the classes we used from System.IO. Packaging in native managed C# code.  We don't use System.IO.Packaging anymore, and so we don't use isolated storage at all. Besides this permissions issue (that was very annoyig because it would only happen with files bigger than 7 mb, so you could be running for a while until you realized you didn't had the permissions)  there was a much important problem because when the file got so big that .NET would switch to isolated storage it stopped being thread safe, and if 2 threads tried to access the isolated storage at the same time the app would hang. And besides, mono implementation of System.IO.Packaging is full of bugs, so we couldn't support xlsx in mono (now we do).

To make things even better, then new system is faster, because instead of writing to a temp isolated storage and then moving from the isolated storage to the real file, we now write directly to the real file :)

Ps: Don't worry about the "beta" label; both  the beta and the stable versions are fully tested and we have many customers already using the beta in production (because of the mutithread hang issue). The only reason we didn't publish it as "stable" yet is that we are waiting for more fixes to justify a new release. But you got me thinking this might be enough reason to publish this beta as stable, I'll see if we can do it.

Regards,
   Adrian.

Adrian Gallero2012-02-29 17:49:28

That's fantastic news, I can't wait to try it out!

Hope everything goes fine, let me know if you get any issues.

UPDATE: The beta version works fine!  Thanks again!