I setup a subscription in a SQL Server 2012 SP1 Reporting Services instance that exports a 34MB file to the Excel 2007-2013 XLSX OpenXML render extension. The subscription
You can find a solution here: http://rekiwi.blogspot.com/2008/12/unable-to-determine-identity-of-domain.html
In the COM component, create a new AppDomain with the appropriate evidence and execute the code in that.
Here is a code example that fixed the problem for me:
AppDomainSetup setup = new AppDomainSetup();
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory.ToString();
//Then we need our evidence
System.Security.Policy.Evidence evidence = new System.Security.Policy.Evidence();
evidence.AddHost(new System.Security.Policy.Zone(System.Security.SecurityZone.MyComputer));
//Now we can fire up an AppDomain running with that evidence.
AppDomain domain = AppDomain.CreateDomain("YourDll.YourClass", evidence, setup);
YourDll.YourClass yourclass = (YourDll.YourClass)domain.CreateInstanceAndUnwrap(typeof(YourDll.YourClass).Assembly.FullName, typeof(YourDll.YourClass).FullName);
yourclass.CallYourMethod();
Any types you want to marshall across AppDomains have to marked [Serializable()] and must inherit from MarshalByRefObject. For example:
namespace YourDll
{
[Serializable()]
public class YourClass: MarshalByRefObject
{
...