1

I'm trying to add a SafeControl entry for a custom web part and know how to do it but just don't know what I'm supposed to put for the Assembly Name. It looks like it should use the template "(name of dll), (version), (culture), (publickeytoken)". Is that the name of the .dll in the bin directory for the project and if so does it require a path or is it simply the name? Does it matter what I set as the version? Culture seems to just always be set as neutral but where do I find this publicKeyToken?

1

Ideally you should not add the safe control entry manually. If you do,Before adding a safe control entry, you need to drag and drop the dll from the bin directory to the assembly(Path:C:\Windows\assembly).Right click on the assembly to get the details. It is as shown in the figure.

enter image description here

You can then follow the steps here

1

The SafeControl entry should be part of the SharePoint Project Item in Visual Studio. Visual Studio supports tokens that will automatically be replaced with the correct value.

The token for SafeControl is $SharePoint.Project.AssemblyFullName$

The full list is here: http://msdn.microsoft.com/en-us/library/ee231545.aspx

0

You shouldn't be adding these entries manually. The solution package containing the custom web part should handle this for you. If not contact your developer/supplier and get them to do their job.

If you're the developer then make sure that if you re-named your web part you fix the broken refrence in the ,spdata file in your solution (show hidden files in the solution explorer to see these)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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