In SharePoint to have a custom config file, with CAS policies set , it requires Blob data of assemblies . Follow the bellow steps to extract public key blob of an assembly.
1. Open Visual studio Command prompt
2. Type Sn -Tp <AssemblyPath>
To redirect the result to a text file , try the below command
Sn -Tp <AssemblyPath> >c:\key.txt
Eg : Sn-Tp c:\my.dll >c:\key.txt
To know more about extracting public key blog through managed code refer the below link
http://blogs.msdn.com/b/shawnfa/archive/2004/11/30/272558.aspx
Leave a comment