The example bellow shows how to set the FullTrust permission on two assemblies, which are signed with the same key. This scenario is very useful by deployment of "Office AddIn-s". By using of VSTO-SE the VisualStudio creates the setup project, which unfortunately "forgets" to set required permissions on the AddIn, when deployed on some other machine (some none-development).
The example bellow shows how to set permissions on two assemblies which utilize, in this specific case Outlook2003 and Outlook2007. The interesting in this example is, that the assembly Daenet.MeetingServiceAddIn2007 implements the Outlook-Addin based on VSTO-SE. However the second assembly Daenet.MeetingService2007, does not implement AddIn functionality, but it is referenced by Daenet.MeetingServiceAddIn2007. In such cases it is required to set the permission (FullTrust) on both.
caspol -q -m -ag All_Code -strong -hex 0024000004800000940000000602000000240000525341310004000001000100954D29E27A7022D263C37DBBE9C4C8744AB4936124E42FA5E53BB5FB1BADEA07F3410FC77DB0050DF7564C510C1DF59602E082C54C627193ADA12F249F5A75CB121B2E41DEE84EFFCC5BA1632AF1289743D6BC33D9F03BA06C7DD3207469FEABABA76B1E2C88F19CA5BE00C27C5830FE7440E269F0D5F310F9109EDC33BE06C0 Daenet.MeetingServiceAddIn2007 -noversion FullTrust -n "Daenet.MeetingServiceAddIn2007" -d "FullTrust for MeetingService Outlook AddIn assembly. This assembly is loaded directly from Office subsystem" -exclusive on
caspol -q -m -ag All_Code -strong -hex 0024000004800000940000000602000000240000525341310004000001000100954D29E27A7022D263C37DBBE9C4C8744AB4936124E42FA5E53BB5FB1BADEA07F3410FC77DB0050DF7564C510C1DF59602E082C54C627193ADA12F249F5A75CB121B2E41DEE84EFFCC5BA1632AF1289743D6BC33D9F03BA06C7DD3207469FEABABA76B1E2C88F19CA5BE00C27C5830FE7440E269F0D5F310F9109EDC33BE06C0 Daenet.MeetingService2007 -noversion FullTrust -n "Daenet.MeetingService2007" -d "FullTrust for MeetingService Outlook AddIn assembly. This assembly is referenced by Daenet.MeetingServiceAddIn2007.Dll." -exclusive on
Some similar example shows how to set FullTrust for all assemblies contained in some specific folder.
Posted
Jul 05 2007, 07:00 PM
by
Damir Dobric