Skip to main content

Hi All,


Once I created a site using K2 site template, then on the home page of site I am getting this error,


[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe.]
  at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)
  at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CompressWebPartNoSave(Boolean isClosed)


due to this the worklist web part on top is not getting displayed. Some safecontrol entry is missing in the web.config of this web application. Can I have that safecontrol entry for this web part from anybody. Thanks for help.

You can try uninstalling and reinstalling the webpart from the system by following the following steps:


1) Browse to Sharepoint Central Administration


2) Click on Operations


3) Click on Solution Management


4) Click on K2WorklistWebpart.wsp


5) If there is a schedule job, first delete the schedule job. Then click on "K2WorklistWebpart.wsp" again. Click on "Retract Solution".


6) Set "Rectract from" to be "All content web applications"


7) Click Ok.


8) Once the solution is retracted, then click on "K2WorklistWebpart.wsp" again.


9) Click on "Remove Solution".


10) Click "Ok".


 


Then Re-add it by running the following command found in this folder C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN :


 


stsadm.exe -o addsolution –filename  “C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTSk2TaskListK2worklistwebpart.wsp”


Remember to re-deploy it again via Central Admin .


Vernon


Hi Vernon,


Yes, I realised afterwards that the required wsp was somehow not deployed on the web application. I redeployed it, and the worklist webpart appears now. Thanks.


 


Avikal


Reply