Answered by:
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.

Question
-
We have an SharePoint services 3.0 installation that uses custom web parts on 100s of subsites. The custom web parts on any website is presenting this errorWeb 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.INitially we attempted to go through the configuration wizard which didnt do anything but add a new database server to our farm. What we have done is remove the new database server from the farm and use an alias on the SP server to continue to use the same name but actually get its data from the new database server.Everything works with the site except these custom webparts.Any thoughts on where to go to first, should i redeploy what i think are the webparts from VS 2005 (solutions are VS 2005 slns.)?
Tony SpauldingWednesday, November 23, 2011 3:44 AM
Answers
-
You need to add something to the web.config file such that it will consider it safe.
http://msdn.microsoft.com/en-us/library/dd583166(office.11).aspx
Jump to: "Strong-Naming Assemblies", and read from there.
Steve Clark, MCTS | Twin-Soft.com- Marked as answer by star.warsModerator Thursday, December 1, 2011 9:00 AM
Wednesday, November 23, 2011 5:17 PM -
You need to make Safe Control enteries in your web.config for the particular web application.
- Open web.config
- Locate the SafeControls Tag
- Make a safe control entry
<SafeControl Assembly="Assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d8eb6481d8b4beec" Namespace="your webpart namespace" TypeName="*" Safe="True" />
In order to find the assembly details, Open the GAC. Right click on your dll and then click properties.- Marked as answer by star.warsModerator Thursday, December 1, 2011 9:01 AM
Sunday, November 27, 2011 12:39 PM
All replies
-
You should remove this custom web part solutions in Central Admin, then reinstall this web part. it will resolve your problem.
/H
Visit my blog: http://tuan-tomy.blogspot.com | Visit my forum: http://sharepointvietnam.net | http://store.bamboosolutions.comWednesday, November 23, 2011 6:31 AM -
Thank you for the update, where do I remove them in CA? I dont see them in the Solution list.
Tony SpauldingWednesday, November 23, 2011 1:58 PM -
You need to add something to the web.config file such that it will consider it safe.
http://msdn.microsoft.com/en-us/library/dd583166(office.11).aspx
Jump to: "Strong-Naming Assemblies", and read from there.
Steve Clark, MCTS | Twin-Soft.com- Marked as answer by star.warsModerator Thursday, December 1, 2011 9:00 AM
Wednesday, November 23, 2011 5:17 PM -
You need to make Safe Control enteries in your web.config for the particular web application.
- Open web.config
- Locate the SafeControls Tag
- Make a safe control entry
<SafeControl Assembly="Assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d8eb6481d8b4beec" Namespace="your webpart namespace" TypeName="*" Safe="True" />
In order to find the assembly details, Open the GAC. Right click on your dll and then click properties.- Marked as answer by star.warsModerator Thursday, December 1, 2011 9:01 AM
Sunday, November 27, 2011 12:39 PM -
Stumbled on this after working with getting SmartPart 2010 working on Sharepoint 2010. (Which may be a whole other ball of wax.)
I got the assembly token and checked in my webconfig and it was already listed as safe, but safeagainstscripts was fales. Should I remove that or set it to true?
Friday, June 1, 2012 4:58 PM -
Hi, I'm having an issue finding the assembly details of the web part I am trying to make a safe control entry for.
Thanks,
Joel
Tuesday, December 24, 2013 3:18 AM -
In may case, the webpart is safe and there is dependent assembly (class library) is safe too, but the dependent assembly is not added to GAC. Once I added the assembly (DLL) in GAC, every thing running cool.
So solution option: project missing in its GAC loaction.
Wednesday, October 18, 2017 12:27 PM