public override void Initialize(WebConfig wc) { base.Initialize(wc); values = defaults; XmlElement e = wc.GetProviderElement(sectionName); if (e == null) return; //GetOptionalParameter(e, "description"); if (e.HasAttribute("enablePasswordRetrieval")) values.EnablePasswordRetrieval = Convert.ToBoolean(e.GetAttribute("enablePasswordRetrieval")); if (e.HasAttribute("enablePasswordReset")) values.EnablePasswordReset = Convert.ToBoolean(e.GetAttribute("enablePasswordReset")); if (e.HasAttribute("requiresQuestionAndAnswer")) values.RequiresQA = Convert.ToBoolean(e.GetAttribute("requiresQuestionAndAnswer")); if (e.HasAttribute("requiresUniqueEmail")) values.RequiresUniqueEmail = Convert.ToBoolean(e.GetAttribute("requiresUniqueEmail")); if (e.HasAttribute("passwordFormat")) values.PasswordFormat = (MembershipPasswordFormat)Enum.Parse(typeof(MembershipPasswordFormat), e.GetAttribute("passwordFormat")); if (e.HasAttribute("passwordStrengthRegularExpression")) values.PasswordStrengthRegEx = e.GetAttribute("passwordStrengthRegularExpression"); if (e.HasAttribute("maxInvalidPasswordAttempts")) values.MaxInvalidPasswordAttempts = Convert.ToInt32(e.GetAttribute("maxInvalidPasswordAttempts")); if (e.HasAttribute("minRequiredPasswordLength")) values.MinRequiredPasswordLength = Convert.ToInt32(e.GetAttribute("minRequiredPasswordLength")); if (e.HasAttribute("minRequiredNonalphanumericCharacters")) values.MinRequiredNonAlphaNumericCharacters = Convert.ToInt32(e.GetAttribute("minRequiredNonalphanumericCharacters")); if (e.HasAttribute("passwordAttemptWindow")) values.PasswordAttemptWindow = Convert.ToInt32(e.GetAttribute("passwordAttemptWindow")); }
public override void Initialize(WebConfig wc) { base.Initialize(wc); values = defaults; XmlElement e = wc.GetProviderElement(sectionName); if (e == null) { return; } //GetOptionalParameter(e, "description"); if (e.HasAttribute("enablePasswordRetrieval")) { values.EnablePasswordRetrieval = Convert.ToBoolean(e.GetAttribute("enablePasswordRetrieval")); } if (e.HasAttribute("enablePasswordReset")) { values.EnablePasswordReset = Convert.ToBoolean(e.GetAttribute("enablePasswordReset")); } if (e.HasAttribute("requiresQuestionAndAnswer")) { values.RequiresQA = Convert.ToBoolean(e.GetAttribute("requiresQuestionAndAnswer")); } if (e.HasAttribute("requiresUniqueEmail")) { values.RequiresUniqueEmail = Convert.ToBoolean(e.GetAttribute("requiresUniqueEmail")); } if (e.HasAttribute("passwordFormat")) { values.PasswordFormat = (MembershipPasswordFormat)Enum.Parse(typeof(MembershipPasswordFormat), e.GetAttribute("passwordFormat")); } if (e.HasAttribute("passwordStrengthRegularExpression")) { values.PasswordStrengthRegEx = e.GetAttribute("passwordStrengthRegularExpression"); } if (e.HasAttribute("maxInvalidPasswordAttempts")) { values.MaxInvalidPasswordAttempts = Convert.ToInt32(e.GetAttribute("maxInvalidPasswordAttempts")); } if (e.HasAttribute("minRequiredPasswordLength")) { values.MinRequiredPasswordLength = Convert.ToInt32(e.GetAttribute("minRequiredPasswordLength")); } if (e.HasAttribute("minRequiredNonalphanumericCharacters")) { values.MinRequiredNonAlphaNumericCharacters = Convert.ToInt32(e.GetAttribute("minRequiredNonalphanumericCharacters")); } if (e.HasAttribute("passwordAttemptWindow")) { values.PasswordAttemptWindow = Convert.ToInt32(e.GetAttribute("passwordAttemptWindow")); } }