0

我有一個聲明身份驗證和FBA設置的SP站點。雙重身份驗證Win/Forms完美運行。SharePoint 2010聲明身份驗證/ FBA - 重置密碼不起作用

我在應用程序頁面上有一個asp:PasswordRecovery控件。 它似乎正確查找帳戶 - 如果找不到用戶名,則返回「未找到」消息。但是,它不能通過以下執行重置密碼:

Exception information: 
    Exception type: NotImplementedException 
    Exception message: The method or operation is not implemented. 


Thread information: 
Thread ID: 10 
Thread account name: SERVER01\SPS_Farm 
Is impersonating: False 
Stack trace: at Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider.GetUser(String name, Boolean userIsOnline) 
at System.Web.Security.MembershipProvider.GetUser(String username, Boolean userIsOnline, Boolean throwOnError) 
at System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordUserNameView() 
at System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) 
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) 
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

在此先感謝。

更新:
我說:
enablePasswordReset設置=「真」
到應用程序的web.config和令牌服務的web.config

寫了一些一些代碼做一個手動測試,而且還當我的代碼嘗試「重置」密碼時得到了這個:
此提供程序未配置爲允許密碼重置。要啓用密碼重置,請在配置文件中將enablePasswordReset設置爲「true」。

回答

1

這可能不會幫助,因爲你似乎在正確查找用戶...但如果你不這樣做,我知道你會遇到不落實的問題:

一定要得到的一個實例用戶使用適當的成員資格提供者。

例如

MembershipUser myUser = Membership.Providers["aspMembership"].GetUser(userName, false); 

希望這會有所幫助。

+0

是的,這是問題......我的代碼試圖使用'聲明提供程序',但它似乎不允許。我不得不直接將成員資格提供程序和連接信息添加到SharePoint網站web.config。 (我不需要它在那裏執行登錄,因爲這是通過索賠。) – Rob 2011-06-03 14:29:01