Re: How do I programmatically verify that strong naming is turned off



I've never come across any built-in API for this. You can, however, read
the list of the verification skip entries from the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification registry key.

BTW, do you need to throw even if the assembly and/or key's presence on the
skip list had no effect (i.e.: if the assembly was fully and validly
signed)? If not, you might want to consider re-validating the assembly
rather than examining the skip list. The StrongNameSignatureVerificationEx
function can be used for this. See
http://blogs.msdn.com/shawnfa/archive/2004/06/07/150378.aspx for details.



"Ganesh" <gr-comdev@xxxxxxxxx> wrote in message
news:O1eQReU9FHA.2792@xxxxxxxxxxxxxxxxxxxxxxx
>I have a requirement to throw an error if the end user turned off strong
>named validation for the assembly or any of its calling assemblies using
>the sn tool.
>
> I know I can make the check using the sn tool, but I want to do it during
> runtime.
>
> regards
> Ganesh


.



Relevant Pages

  • Re: Installing issues...please help
    ... btw what is fuslogvw.exe? ... > Give fuslogvw.exe a whirl and make sure that all of the assemblies you ... > HTH ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: GAC References Not Being Updated?
    ... >p.s. BTW, setting Copy Local to True is not an option here, ... >because Project1 also loads Assembly B dynamically, ... assemblies in your application? ... automatically increased each time it is being built in the VS.NET IDE, ...
    (microsoft.public.vsnet.general)
  • Re: Activator.CreateInstanceFrom
    ... BTW, the System.Windows.Forms.Button was just an example, I plan on using ... Also since it was already in the gac I figured ... > you can create instances from GAC assemblies is to first load the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How do I programmatically verify that strong naming is turned off
    ... the list of the verification skip entries from the ... BTW, do you need to throw even if the assembly and/or key's presence on the skip list had no effect? ... named validation for the assembly or any of its calling assemblies using the sn tool. ...
    (microsoft.public.dotnet.security)
  • Re: using a C# class library in both COM and .NET code?
    ... registered through COM (which you did incorrect, btw, you need to call ... regsvcs to register assemblies for COM+, I believe), it created a TLB and ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast