I have a server executable that is negotiating with Active Directory to get user information. Besides AD, this exe allows clients to write their own plugins to talk to user user directories.
This executable file has a strong name.
Is the following true statement:
For a strongly named assembly to load another assembly, the loadable assembly must also be signed with the same key.
The following code returns null if the assembly is not strongly signed, without an error indicating that the assembly was not properly signed. Please note: if I sign the assembly, I get an instance of IService. This makes me think that loaded assemblies should be strictly signed.
Assembly assembly = Assembly.LoadFrom(path);
foreach (Type t in assembly.GetTypes())
{
if (t.GetInterface(typeof(IService).FullName) != null)
{
return (Activator.CreateInstance(t) as IService);
}
}
, , , - ? .
, , , IService, , , . , ? ?