Surya,
You can get this by using the Assembly class instance that represents
the Assembly. The Name property will expose an AssemblyName instance. From
there, you can call the GetPublicKey method on the AssemblyName instance and
get the key.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"surya" <su************************@honeywell.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
Nicholas,
Thanks for the reply.
Can I get the public key of a signed assembly at runtime using the
Evidence of the assembly? This would help in determining whether the assembly can
be trusted.
Regards
Surya
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:uG**************@TK2MSFTNGP12.phx.gbl... Surya,
You aren't going to be able to do this. You are going to have to
implement a load mechanism yourself and then have all of your code go
through that mechanism.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"surya" <su************************@honeywell.com> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl... Hi,
I use the Assembly.LoadFrom call in my code to load assemblies
dynamically. This call currently loads both signed and unsigned assemblies.
It now needs to be changed to load only signed assemblies. Again only
those signed assemblies with known public keys need to be loaded.
Is there an easy way to implement this?
Regards
Surya