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

Asked By sweety chinnu
12-Mar-09 01:24 AM

Hi,

When iam trying to deploy custom webpart ,iam getting the errror,Already i had created strong name ,kept the dll in GAC and had specified public key token etc in Web.config file.

 

Thanks

READ THIS  READ THIS

12-Mar-09 03:08 AM
First you'll have to find out which web part it is.  Obviously its going to be a web part that is non-standard.  When you find it, you need to make sure that the web part dll is registered in the GAC on all of your web servers and then in your web.config file that is found in your virtual server root (C:\inetpub\wwwroot if SharePoint is your default web app) and make sure your web part is registered as a safe control.


Here are a couple of entries from my web.config file:


    <SafeControls>
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" />
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" />

TRY THIS  TRY THIS

12-Mar-09 03:12 AM
When deploying webparts to another server  you get this error("A web part or web Form Control on this Page cannot be displayed or imported. The type is not registered as safe") even if you have your webpart registered as safe in the web.config, don't stress its the namespace, your namespace doesn't have to contain spaces rather use dots or _ for spaces of the webpart name , especially if you are going to deploy the webpart to another server.
Its very simple  Its very simple
12-Mar-09 03:49 AM
Hi Sweety,
                       How are you!

                      Its very simple, go to central administration --> Solution Management ---> select your webpart solution and click on the webpart solution then select the web application as you want then deploy it.

                     Next step is go to site actions --> site settings--> webpart --> and new webpart add the solution webpart as you deploy in central admin tool.  Then go to home page refresh the page, edit page, then add the webpart.

Regards,
Venkatesh
               
did you got it  did you got it
13-Mar-09 12:36 AM
did you got it
I had done all ...  I had done all ...
13-Mar-09 02:09 AM

The uploaded files not working...

  Eric Schrader replied to sweety chinnu
29-Dec-10 05:24 PM
If you are deploying a web part through a wsp file, make sure you not only deployed the solution to the web application you first did the stsadm command on, but on any other web application that you would like to activate the web part feature on.

stsadm -o deploysolution -name "name of the wsp.wsp" -immediate -allowgacdeployment -force -url "http://myurlhere:81"

stsadm -o execadmsvcjobs

repeat this for each web app (aka port) you want to activate your web part feature on. eg:

stsadm -o deploysolution -name "name of the wsp.wsp" -immediate -allowgacdeployment -force -url "http://myurlhere:82"

stsadm -o deploysolution -name "name of the wsp.wsp" -immediate -allowgacdeployment -force -url "http://myurlhere:83"

stsadm -o execadmsvcjobs

etc

This command registers your web part as safe at the web application level, even though your web part feature is scopped to the site collection level. So you may need to activate your site collection feature to deploy the web part on each site collection. But you only need to run the stsadm commands above on each web application you want to run the web part on.
Create New Account
help
Receive an error when adding a webpart to a sharepoint page SharePoint I am using sharepoint services version 3 on windows standard server 2003 x64. When I try to add a standard webpart that comes with sharepoint to a page, I receive the following error: object reference not set to an instance of an object at Microsoft.sharepoint.webpartpages.virtualserverwebpartdataprovider.get_virtualRootPath() at microsoft.sharepoint.webpartpages.virtualserver.webpartdataprovider. . ctor(spWeb web) at microsoft.sharepoint.webcontrols.webpartgallerypicker.FindAllWebParts() at Microsoft.sharpeoint
UpdatePanel in a SharePoint Page SharePoint Hi, I have a custom SharePoint page with the UpdatePanel control in it. To enable it to work: (1) I added the required web.config changes (2) Added a ScriptManager to my page, and added the required code on Page_Load. I can see that it is doing the require updating. However, in IE, when the user scrolls down and clicks on something, the page will be updated to reflect the changes, *but will scroll back up to the top
user control and page master SharePoint Hello: I need to add an user control to the master page of my Sharepoint. this user control must in all pages of Sharepoint Portal. any idea?? Thanks SharePoint Development Discussions TemplateRe (1) ThanksRE (1) ComThank (1) GAC (1
Code behind for SharePoint Page SharePoint Hi there, I am looking for a way to write some code in C# (or any other .NET languages) for a sharepoint page. But I am not watching any way to do that yet. Basically, I need to create a page inside a SharePoint portal and I need to keep some code-behind logics for the page. In fact, I have to mantain a master page too. Can anybody suggest me and
Page Layout and Page Content SharePoint HI I have created my own page layout with tables, page content and page image. When I add a second page content to the page layout and modify it, its populated with the same info as in my first page