SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been following the following guide to write and deploy a simple web part (first time doing this):

I hit the point of adding my web part information to the web.config file on my server. Unfortunately for me the guide doesn't explain how I can find out what the publickeytoken for my web part is so I know what to set it as in my web.config file.

I took one from another web part as a test, adding the following line into web.config but my web part is unavailable in the gallary (the DLL file is in the bin directory already also). Help?

 <SafeControl Assembly="RE.PerformancePart, Version=, Culture=neutral, PublicKeyToken=8c72b2bd3eb9ec1e" Namespace="RE.PerformancePart" TypeName="*" Safe="True" />
share|improve this question
up vote 2 down vote accepted

Google "how do i find publickeytoken". Second hit gives you an easy to implement answer.

Visual Studio Tip: Get Public Key Token for a Strong Named Assembly

share|improve this answer

The key will be added to your assembly after you have signed it. All assemblies that go in to the GAC has to be signed. So after adding the assembly to the GAC you can look at the Public Key Token column, in the GAC folder, and get the key you need.

you can also use this tool

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.