середа, 25 травня 2011 р.

Default ASP.NET Membership Provider Settings

Code to view settings:

protected void Page_Load(object sender, EventArgs e)
{
var type = typeof(Membership);

var infos = type.GetProperties(BindingFlags.Public | BindingFlags.Static);

foreach (var p in infos)
{
PrintProp(p);
}
}

private void PrintProp(PropertyInfo p)
{
var value = p.GetValue(null, null);

Response.Write(string.Format("<b>{0}</b>: {1}<br />", p.Name, value));
}


Result:

EnablePasswordRetrieval: False
EnablePasswordReset: True
RequiresQuestionAndAnswer: True
UserIsOnlineTimeWindow: 15
Providers: System.Web.Security.MembershipProviderCollection
Provider: System.Web.Security.SqlMembershipProvider
HashAlgorithmType: HMACSHA256
MaxInvalidPasswordAttempts: 5
PasswordAttemptWindow: 10
MinRequiredPasswordLength: 7
MinRequiredNonAlphanumericCharacters: 1
PasswordStrengthRegularExpression:
ApplicationName: /

and from machine.config

requiresUniqueEmail: false

Немає коментарів:

Дописати коментар