zoukankan      html  css  js  c++  java
  • 此网页的安全性验证无效并且可能损坏

    Microsoft.SharePoint.SPException: 此网页的安全性验证无效并且可能损坏。请单击 Web 浏览器中的“后退”,刷新网页,再重试操作。 ---> System.Runtime.InteropServices.COMException (0x8102006D): 此网页的安全性验证无效并且可能损坏。请单击 Web 浏览器中的“后退”,刷新网页,再重试操作。 在 Microsoft.SharePoint.Library.SPRequestInternalClass.UpdateMembers(String bstrUrl, Guid& pguidScopeId, Int32 lGroupID, Int32 lGroupOwnerId, Object& pvarArrayAdd, Object& pvarArrayAddIds, Object& pvarArrayLoginsRemove, Object& pvarArrayIdsRemove, Boolean bSendEmail) 在 Microsoft.SharePoint.Library.SPRequest.UpdateMembers(String bstrUrl, Guid& pguidScopeId, Int32 lGroupID, Int32 lGroupOwnerId, Object& pvarArrayAdd, Object& pvarArrayAddIds, Object& pvarArrayLoginsRemove, Object& pvarArrayIdsRemove, Boolean bSendEmail) --- 内部异常堆栈跟踪的结尾 --- 在 Microsoft.SharePoint.Library.SPRequest.UpdateMembers(String bstrUrl, Guid& pguidScopeId, Int32 lGroupID, Int32 lGroupOwnerId, Object& pvarArrayAdd, Object& pvarArrayAddIds, Object& pvarArrayLoginsRemove, Object& pvarArrayIdsRemove, Boolean bSendEmail) 在 Microsoft.SharePoint.SPRoleAssignmentCollection.RemoveMembers(Int32[] IdsToRemove, Int32 roleId) 在 Microsoft.SharePoint.SPRoleAssignmentCollection.RemoveMember(Int32 id) 在 Microsoft.SharePoint.SPRoleAssignmentCollection.Remove(Int32 index) 在 ASP._layouts_ealend_aspx.updatePermission(SPListItem cItem) 位置 c:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"LAYOUTS"eaLend.aspx:行号 213

                    //取消继承
                    if (!cItem.HasUniqueRoleAssignments)
                        cItem.BreakRoleInheritance(true);
                    //清除权限
                    while (cItem.RoleAssignments.Count > 0)
                    {
                        cItem.RoleAssignments.Remove(0);//错误行
                    }

     出现错误应该是权限问题,但是我已经

                         cSite.AllowUnsafeUpdates = true;
                        cWeb.AllowUnsafeUpdates = true;

    最后,改成这样就不报错了

                    //取消继承
                    if (!cItem.HasUniqueRoleAssignments)
                        cItem.BreakRoleInheritance(true);
                    //清除权限
                    while (cItem.RoleAssignments.Count > 0)
                    {
                        cSite.AllowUnsafeUpdates = true;
                        cWeb.AllowUnsafeUpdates = true;
                        cItem.RoleAssignments.Remove(0);
                        cSite.AllowUnsafeUpdates = false;
                        cWeb.AllowUnsafeUpdates = false;
                    }

  • 相关阅读:
    搭建SpringCloud之注册中心Eureka
    学习角色管理模块错误总结---基于SpringMVC框架
    【转】Eclipse 单步调试
    [转]MyBatis的foreach语句详解
    解决pom.xml文件 ---- web.xml is missing and <failOnMissingWebXml> is set to true
    解决Dynamic Web Module 3.0 Requires Java 1.6 or newer
    用maven在eclipse用spring建javaweb工程(一)
    【转载】Eclipse 断点调试
    学习大神笔记之“MyBatis学习总结(三)”
    学习大神笔记之“MyBatis学习总结(二)”
  • 原文地址:https://www.cnblogs.com/liuzhengdao/p/1298018.html
Copyright © 2011-2022 走看看