1

We have an anonymous website (configured as shown in this blog on How to enable anonymous access in SharePoint 2013). If you make a new standard visual webpart (farm solution) and want to add it to the site, I get this error:

A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

In my German language:

"Ein Webpart oder Webformular-Steuerelement auf dieser Seite kann nicht angezeigt oder importiert werden. Der Typ 'VisualWebPartProject1.VisualWebPart1.VisualWebPart1, VisualWebPartProject1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xyz' wurde nicht gefunden oder ist nicht als sicher registriert."

What is wrong if a standard visual webpart with no changes could not be added to the anonymouse site? Deploying works. Safe Control Entries are automatically set and should be fine. We deploy directly in GAC and use no .wsp in this test.

1 Answer 1

1

I found it here: https://social.msdn.microsoft.com/Forums/de-de/3c6f572b-fc0a-4be2-81c5-28d1220edcab/adding-a-custom-webpart-to-webpart-page-not-a-safe-control-issue?forum=sharepointdevelopment

I had to copy the safe control entry in the web.config of the application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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