Solved

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

Posted on 2011-03-24
1
555 Views
Last Modified: 2012-05-11
Hi Folks,

I am getting this error whenever I am trying to add a web part on any sharepoint site.

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

Please let me know what could be wrong with my web part.
Thanks.
0
Comment
Question by:rgosai6149
1 Comment
 
LVL 14

Accepted Solution

by:
KoenVosters earned 500 total points
Comment Utility
Your webpart isn't registered as a safe control in the web.config of the web application that you are putting it into:

http://msdn.microsoft.com/en-us/library/dd587360(v=office.11).aspx

You should have a line in your web.config that resembles this:

<SafeControl
   Assembly="SimpleWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def148956c61a16b"
   Namespace="MyWebParts"
   TypeName="*"
   Safe="True"
/>

but then with your assembly and classname and publickeytoken
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now