sharepoint 中添加webpart 报"Unable to add selected web part(s)....
2010-04-03 18:14
495 查看
当我写好一个 webPart时! 部署到sharepoint里面! 但是在sharepoint 里面编辑页面点击 add a web webpart 按钮 时!找到在vs里面我写的webpart!点击添加按钮!出现了"Unable to add selected web part(s).
UCWebPart:Assembly that implement ASP.NET Web Parts and are installed into a partially into a partially trusted locaton,such as the bin directory ,must be compiled with the allowpartially trustedCallersAttribute set for import to succeed"这个对话框!
后来我检测端口下面的web.config里面的配置!
1. <SafeControl Assembly="Sample.SayHello, Version=1.0.0.0, Culture=neutral, PublicKeyToken=942df97ad6eaef86" Namespace="Sample.SayHello" TypeName="*" Safe="True" /> 注册为安全控件
2. <trust level="Full" originUrl="" /> 这里也改为full了!
3. 把webpart的dll放到 端口下面 bin目录里面!
检查以上都没有问题!
最后在http://space.cnblogs.com/group/topic/30669/找到了解决方案!
解决方案:
我们需要在该项目的AssemblyInfo.cs文件里添加 using System.Security引用 ,在最后添加一个 [assembly: AllowPartiallyTrustedCallers]!
最后测试OK!
在此感谢原作者!
UCWebPart:Assembly that implement ASP.NET Web Parts and are installed into a partially into a partially trusted locaton,such as the bin directory ,must be compiled with the allowpartially trustedCallersAttribute set for import to succeed"这个对话框!
后来我检测端口下面的web.config里面的配置!
1. <SafeControl Assembly="Sample.SayHello, Version=1.0.0.0, Culture=neutral, PublicKeyToken=942df97ad6eaef86" Namespace="Sample.SayHello" TypeName="*" Safe="True" /> 注册为安全控件
2. <trust level="Full" originUrl="" /> 这里也改为full了!
3. 把webpart的dll放到 端口下面 bin目录里面!
检查以上都没有问题!
最后在http://space.cnblogs.com/group/topic/30669/找到了解决方案!
解决方案:
我们需要在该项目的AssemblyInfo.cs文件里添加 using System.Security引用 ,在最后添加一个 [assembly: AllowPartiallyTrustedCallers]!
最后测试OK!
在此感谢原作者!
相关文章推荐
- "Unable to add selected web parts. (insert part name): An error has occured."
- Unable to add selected web part(s). Cannot import this web part
- Sharepoint 2010 解决DFWP - Unable to display this Web Part 的问题
- tomcat 运行jenkins启动时日志警告org.apache.catalina.webresources.Cache.getResource Unable to add the resource
- To deploy the Web Part(Cab Files) to SharePoint Server 2007(Sharepoint 2007 SDK)
- Selected solutions to exercise of "The C Programming Language" 2e (Part 2)
- android生成apk包出现Unable to add "XXX" Zip add failed问题
- Selected solutions to exercise of "The C Programming Language" 2e (Part 3)
- Selected solutions to exercise of "The C Programming Language" 2e (Part 6)
- tomcat9启动中提示 org.apache.catalina.webresources.Cache.getResource Unable to add the resource
- Error:Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows .....
- Tomcat启动报错或警告: org.apache.catalina.webresources.Cache.getResource Unable to add the resource
- [sharepoint]:无法添加选择的web部件,cannot import web part
- Add Dict To Your Web 给网页添加查词功能
- android生成apk包出现Unable to add "XXX" Zip add failed问题
- "无法启动Web服务器。Web服务器无法找到请求的资源" 或 "unable to start debugging on the web server.the web server could not find the request"解决方法
- Selected solutions to exercise of "The C Programming Language" 2e (Part 7, End of Chapter 1)
- Tomcat8 启动中提示 org.apache.catalina.webresources.Cache.getResource Unable to add the resource
- SharePoint 使用代码创建 SPWeb/SPSiite/SPWebApplication以及WebPart添加到页面与删除 (一)
- SharePoint 2013 搜索报错"Unable to retrieve topology component health. This may be because the admin component is not up and running"