.net - Why is it possible to load types in an unsigned assembly from a signed assembly using reflection? -
i have 2 assemblies , b. strong named , b not.
according msdn cannot reference b because strong named assembly can reference strong named assembly.
but why possible load assembly b, instantiate class , call methods assembly using reflection?
// inside assembly assembly b = assembly.loadfrom("b"); obj myobj = b.createinstance("myclass");
doesn't defeat purpose of not allowing reference unsigned assemblies in signed one?
well, have understand strong-named assemblies designed circumvent "dll hell" , allow "side-by-side versioning". afaik not designed security.
therefore, you're allowed use reflection in strong-named assembly call methods , instantiate classes in unsigned assemblies. framework assumes know you're doing because you're explicitly loading file -- , therefore should know file want. in other words, telling framework: "for assembly, want manage own versioning."
Comments
Post a Comment