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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Backup of Sharepoint Online 3 122
Moving SharePoint 3.0 role to differen server 7 68
SharePoint 2010 Foundation Gatherer 10 74
sharepoint list help 2 36
Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
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 Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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