Shawn has an excellent post about Dynamic Assemblies and Declarative Security, please check it out:
http://blogs.msdn.com/shawnfa/archive/2005/05.aspx