Can StrongNameIdentityPermission be ignored?

Hi,

I'm working on a rather complex application that interfaces with mscorlib extensively,
unfortunatly some of the calls I need to make require StrongNameIdentityPermission where the public key = ecma key - obviously I can't sign my assemblies with the ECMA key.

I am perplexed by the complexity of .NET Security, what I want to know is: can I configure the machine security to somehow grant the StrongNameIdentityPermission to my assembly, even though it has a different public key

I noticed in a windows forms app, if a security permission is not granted, a dialog is displayed, allowing the user to continue or exit - surely I can configure 'continue' by default

Help much appreciated,
John


Answer this question

Can StrongNameIdentityPermission be ignored?

  • SireeBob

    Hi,

    The StrongNameIdentityPermission is failing for me even if I am using the correct SNK file in my caller assembly.

    I have an XBAP application (partial trust) which calls an assembly Assembly 1.

    I have made Assembly 1 secure by specifying the StrongNameIdentityPermission at the class level and the XBAP program is signed with the correct SNK file.

    Still it gives a security exception while doing the StrongNameIdentityPermission check.

    I am unable to find a reason why it is failing. Is it because of .NET 3.0 framework or is it something else

    Thanks & Regards,

    Nishant


  • hxibrahim

    Techincally as of v2.0 of the CLR, any fully trusted assembly (so everything in the GAC, and by default everything on your computer) will satisfy every demand -- even identity demands for identities they don't technically have.

    The reason for that is that it's very easy for a fully trusted assembly to "fake" its identity, which has the net effect of the v2.0 behavior.  We made the change so that people didn't feel they were secure against fully trusted callers just because they used a SNIP.  (You can read more about it on Eugene's FullTrust means FullTrust blog post).

    That being said -- mscorlib APIs protected by a SNIP are generally there for use by Microsoft callers only, and are not for public consumption.  That means you're not going to get any documentation or support for them, and you may end up having to deal with version to version breaks.

    Which API are you tring to call, and what are you trying to do   There may be a more supported route for you to go.

    -Shawn



  • Can StrongNameIdentityPermission be ignored?