Anda dapat menemukan solusinya di sini:http://rekiwi.blogspot.com/2008/12/unable-to-determine-identity-of-domain.html
Di komponen COM, buat AppDomain baru dengan bukti yang sesuai dan jalankan kode di dalamnya.
Berikut adalah contoh kode yang memperbaiki masalah bagi saya:
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();
Jenis apa pun yang ingin Anda susun di AppDomains harus ditandai [Serializable()] dan harus mewarisi dari MarshalByRefObject.Misalnya:
namespace YourDll
{
[Serializable()]
public class YourClass: MarshalByRefObject
{
...