.Net assemblies not properly signed by microsoft RRS feed

  • Question

  • I am trying to validate the signature of the calling assemblies in my application.

    One of the steps I am taking is verifying the calling assemblies are properly signed, using this:

    [DllImport("mscoree.dll", CharSet = CharSet.Unicode)]
    private static extern bool StrongNameSignatureVerificationEx(string wszFilePath, bool fForceVerification, ref bool pfWasVerified);

    For the most part this has been fine, but when my application runs as a windows service, these two assemblies report as unsigned:



    So, they have public key tokens, but it is as if they were only Delay signed?

    Does anyone have any insight as to why this would be? Thank you.

    Edit: I am calling it like so:

    var unusedVerify = false;
    if (!StrongNameSignatureVerificationEx(assembly.Location, true, ref unusedVerify))
      throw new UnauthorizedAccessException("unsigned");

    • Edited by saberrebas Tuesday, May 21, 2013 5:22 AM
    Tuesday, May 21, 2013 4:48 AM


All replies