Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've been following the following guide to write and deploy a simple web part (first time doing this): http://www.codeproject.com/Articles/25019/Getting-started-with-SharePoint-2007-Web-Parts

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=1.0.0.0, Culture=neutral, PublicKeyToken=8c72b2bd3eb9ec1e" Namespace="RE.PerformancePart" TypeName="*" Safe="True" />
share|improve this question
add comment

2 Answers

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
add comment

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 http://msdn.microsoft.com/en-us/library/k5b5tt23%28VS.80%29.aspx

share|improve this answer
add comment

Your Answer

 
discard

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.