?
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
Medium Priority
?
609 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
KoenVosters earned 2000 total points
ID: 35214843
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

777 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