HashPasswordForStoringInConfigFile已過時
發布時間:2021/12/17 17:45:37 作者:Admin 閱讀:500
廣告:阿里云采購優惠專區
警告 CS0618 “FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)”已過時:“The recommended alternative is to use the Membership APIs, such as Membership.CreateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.” FeiShareLibrary E:\aspnet2.0\53BK公司網站-net-家里\FeiShareLibrary\Haocookie.cs 79 活動
FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5")
換成: NewMD5(sKey, "md5")
public static string NewMD5(string strData,string md5str) { string strResult = ""; using (var md5 = MD5.Create()) { var result = md5.ComputeHash(Encoding.UTF8.GetBytes(strData)); strResult = BitConverter.ToString(result); strResult= strResult.Replace("-", "").ToUpper(); } return strResult; }
廣告:阿里云新人采購專場
相關文章