[英]SharePoint 2010 - A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe
I have been stuck on this error and am unable to solve it since the past few days. 自从过去几天以来,我一直陷在这个错误中,无法解决它。 I have googled all I could, but none of the solutions seems to work for me.
我已尽一切可能用Google搜索,但似乎没有一种解决方案适合我。 I'll go through all the steps I've done and hopefully, someone might be able to catch a mistake.
我将完成所有步骤,并希望有人可能会发现一个错误。 Also, I've been developing with SharePoint for quite a while now, but still a beginner in some parts.
另外,我已经使用SharePoint开发了相当长的时间,但是在某些方面还是一个初学者。
I have created my site in my SharePoint and created a new Site Collection for it. 我已经在SharePoint中创建了网站,并为其创建了一个新的网站集。 I deployed my web part with the following command in powershell:
我在powershell中使用以下命令部署了Web部件:
Update-SPSolution -Identity xxxxx.wsp -GACDeployment -LiteralPath "C:\Users\username\Desktop\xxxxx.wsp"
I then go to my created my site and add the web part. 然后,我转到创建的网站并添加Web部件。 Which alerts me with the following message.
哪条消息提示我。
I tried many solutions including, 我尝试了许多解决方案,包括:
<SafeControl Assembly="xxxxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4a87d6fcb45f5672" Namespace="xxxxx.xxx" TypeName="*" Safe="True" SafeAgainstScript="False" />
I also checked my Application Logs in the Event Viewer, but there are no errors mentioned there as well. 我还在事件查看器中检查了我的应用程序日志,但是这里也没有提到任何错误。
After all this, I have a feeling maybe it might be a problem with my User Profile Service creation, though I'm not very familiar with this side of SharePoint. 经历了所有这些之后,尽管我对SharePoint的这一方面不是很熟悉,但是我可能感觉这可能与我的User Profile Service创建有关。
I followed these two tutorials to create a User Profile Service & the My Site: http://sharepointgeorge.com/2010/configuring-the-user-profile-service-in-sharepoint-2010/ http://www.boostsolutions.com/blog/how-to-create-configure-my-sites-in-sharepoint-2010/ 我跟着这两个教程,以创建一个用户配置文件服务与我的网站: http://sharepointgeorge.com/2010/configuring-the-user-profile-service-in-sharepoint-2010/ HTTP://www.boostsolutions。 COM /博客/如何到创建-配置-我的网站,在SharePoint的-2010 /
I think the steps you have taken is proper and it should work. 我认为您采取的步骤是正确的,应该可以正常工作。 Cna you try one more thing.
您可以再尝试一件事。 Can you just go and remove that * sign for the TypeName ?
您可以删除TypeName的*符号吗?
Then try to deploy again 然后尝试再次部署
Let me know the result. 让我知道结果。
Edit: 编辑:
As per Comments Use this command to deploy the solution "stsadm -o deploysolution -name xxxxx.wsp -immediate -allowGacDeployment -force -allcontenturls" 按照注释使用此命令来部署解决方案“ stsadm -o deploysolution -name xxxxx.wsp -immediate -allowGacDeployment -force -allcontenturls”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.