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
576 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
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
InfoPath 2013 4 75
SharePoint CAML Query - retrieving field names 3 68
Set cookies HttpOnly and Secure 4 165
Sharepoint Online 5 32
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

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