sharepoint表单用户修改密码未实现该方法或操作
这次我想应用.net中的changepassword控件来实现表单用户密码的修改,但是出现了问题,而且估计是这个控件对专业人士来说比较简单吧,没找到几个教学贴。。。
我新建了一个更改密码的网页ChangePassword.aspx。代码如下:
C# code? <%@ Assembly Name="Microsoft.SharePoint.IdentityModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Assembly Name="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" MasterPageFile="~/_layouts/simple.master" %> <%@ Import Namespace="Microsoft.SharePoint.WebControls" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Import Namespace="Microsoft.SharePoint.Administration" %> <%@ Import Namespace="Microsoft.SharePoint.Administration.Claims" %> <%@ Import Namespace="System.IdentityModel.Tokens" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"> 更改密码界面 </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server"> <!--Sign Up--> 华工部 </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderId="PlaceHolderSiteName" runat="server"/> <asp:Content ID="Content4" ContentPlaceHolderId="PlaceHolderMain" runat="server"> <asp:ChangePassword ID="ChangePassword1" runat="server" DisplayUserName="true"> </asp:ChangePassword> </asp:Content>
貌似是没有指定成员资格提供程序
错误原因无非是asp.net的ChangePassword在完成更改密码后会自动使用户登录,但是asp.net的默认登录逻辑跟SP2013的Claim认证机制估计不兼容。更改完密码后关闭浏览器就没问题