Create Public Key Blob for an Assembly

Ashok Raja
 
Solutions Architect
June 10, 2012
 
Rate this article
 
Views
315

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

Category : .Net, Tips

Author Info

Ashok Raja
 
Solutions Architect
 
Rate this article
 
I am Ashok Raja, Share Point Consultant and Architect based out of Chennai, India. ...read more
 

Leave a comment