Using the StrongNameIdentityPermissionAttribute

In a recent thread on the .NET newsgroups, someone asked how they could create a "utility" assembly, but they only wanted their applications to be able to use the assembly.  I couldn't think of a good way, but Dave Sexton replied with an interesting little gem on the StrongNameIdentityPermissionAttribute.  After reading his response I made myself a little "to do" item to implement his idea and post some sample code.

Today, I came across a blog post from Morgan Skinner that explained the process and showed an example.  Very cool!

1 Comment

  • Interesting but not quite safe because CAS can be disabled (e.g using SecurityManager.SecurityEnabled=false from a fully trusted assembly)a better solution would be using assembly: InternalsVisibleTo(...) attribute.

Comments have been disabled for this content.