我正在處理使用自定義 MembershipProvider 的舊版 ASP.NET 網站專案。我想利用它提供的現有功能來實作密碼驗證。我想確保所有未來的密碼都有一定的長度,并包含一定數量的大寫、小寫和非字母數字字符。
到目前為止,我所做的是根據檔案中的示例在網站默認頁面的 page_load 函式中注冊一個 MembershipValidatePasswordEventHandler,
So the logon control has a set of events - but the actual validation of the user occurs inside of the custom sqlmemberShipProivder class that I'm assuming was used here. That class thus should have a whole bunch of things like GetUser, ValidateUser, ChangePassword. The whole idea here is WHEN that provider is written correctly, then use of logon control, change password control etc will all JUST work for you, without having to build up the logon control(s) provided in the toolbox for this process.
So, in that custom class (sqlMemberShipProivder), there is this: (and many more)

I don't see a Validate Password user - but there is a ValidateUser event.
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/395022.html
標籤:C# 网站 视觉工作室 会员提供者 asp.net-4.5
