Caspol and StrongName

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

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
Filed under:

Comments

Damir Dobric wrote re: Caspol and StrongName
on 07-22-2008 11:00

This example shows how to obtain key HEX value from DLL:

developers.de/.../unit-testing-and-internalsvisibleto.aspx.

Damir Dobric wrote re: Caspol and StrongName
on 07-22-2008 11:32

Here is an example which shows how to set FullTrust by strong name for all assemblies signed with the specified key:

caspol -q -m -ag All_Code -strong -hex 0024000004800000940000000602000000240000525341310004

6f631d30051456e2b2771f3acd2bb959c9b7971023edc61f0c29806e47e9d356d8c9629535ff47e34a00a8e4bed700a056b01e9aa93fa6d76ba3dff12a9cae1fab540dcf19e1f4d55125e3a66eab8a52b6a8640413bee8260ef516

0aa293b927a7c02f93d54242b26920606babc1cba8 -noname -noversion FullTrust -n "Some name" -d "FullTrust for all Assemblies with key xyz" -exclusive on

developers.de is a .Net Community Blog powered by daenet GmbH.