Du kan finde en løsning her:http://rekiwi.blogspot.com/2008/12/unable-to-determine-identity-of-domain.html
I COM-komponenten skal du oprette et nyt AppDomain med de relevante beviser og udføre koden i det.
Her er et kodeeksempel, der løste problemet for mig:
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();
Alle typer, du vil sortere på tværs af AppDomains, skal markeres med [Serializable()] og skal arve fra MarshalByRefObject. For eksempel:
namespace YourDll
{
[Serializable()]
public class YourClass: MarshalByRefObject
{
...