Search The Blog
About this site

@RoyOsherove

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

from 5whys.com
Twitter: @RoyOsherove
My Book: The Art of Unit Testing
Latest Posts
« Do not serialize delegates and events blindly | Main | Developing as non-admin made easier with VS.Net 2005? »
Wednesday
Dec292004

Denying your public classes from your end customers

Here's a cool way to make sure that no one else but your application can use any of the public classes that are exposed by your business assemblies: you put a permission requirement on the class that requires the strong name of your calling assembly:

[StrongNameIdentityPermission(SecurityActoin.LinkDemand, PublicKey="XXXYY)]

public class MyPublicLogicClass

{

//do something

}

[via Juval Lowy's .Net Master class]

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>