Contents
Is there a web part error on this page?
Web Part 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. This past weekend we decided to create a new database server and migrate the databases to the new server in an effort to retire an old box.
Is there a web part or web form control error?
But I’m having this error message every time: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type SharePointProject1.WebPartName.WebPartName, SharePointProject1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32e59cf2728706a0 could not be found or it is not registered as safe.
Why is my Web part not declared as safe in web.config?
Your Web part is not correctly declared as Safe in the web.config. Do you see the web.config SafeControl entry in the wb.config? Was is added automatically? Can you share it with us so we can check together?
Is there an unsafecontrolexception on this page?
[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported.
Is the class name of your web part correct?
The class name of your Web part is UI_External (thus its full name is External.UI_External.UI_External: is it correct, or is there also an error here? I strongly suggest you to carrefully review the names of your project/assembly/namespaces/classes and be sure they’re all set correctly.
How to search web part entry in web config file?
Try to search your web part entry in web config file. In cases, when you save site template from web application and try to use in different web application you can face this issue. Or sometimes, people download the .webpart file from web part gallery and upload them to different web application which results in Not a Safe Control issue.
How to search safe control entry in web config file?
The safe control entry looks like following: Try to search your web part entry in web config file. In cases, when you save site template from web application and try to use in different web application you can face this issue.
Where do I add safe control in SharePoint?
You need to add the web part type as safe control in the web applications “web.config” file and in the configuration > SharePoint > SafeControls section. The general format is like below:
How to change the class name of a web part?
Just replace AssemblyName, AssemblyVersion, AssemblyCulture, AssemblyPublicKeyToken, The class name of the web-part and The class name of the web-part with the information to your web-part. This is usally shown very clear in the Trace logs.
What to do if web part is not registered as safe?
Sounds like you are missing the element from your package. Normally it is added for you if you create it in VS2010. But if your web part/control is in another assembly you may have to add it manualy Something like this should go in your Package.Template.xml file (Solution explorer -> Package -> Open -> Manifest -> Edit Options)
Why does my WSP say the type is not registered as safe?
I keep getting this error when I try to add a web part that I added through a WSP: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe. Is there something I need to do differently with my WSP in order to get this error message to go away?
What does the type is not registered as safe mean?
A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe. Is there something I need to do differently with my WSP in order to get this error message to go away?