0
votes

I inherited a CMS-based site (not open source) that has a custom membership provider based on the ASP.NET membership provider.

When we attempt to add or edit a user with less than 5 characters in their UserName, the CMS webform pops up an error window stating that it requires a minimum of 5 characters for the UserName field.

I'm not sure if this an ASP.NET Membership Provider constraint or whether it comes from the CMS custom membership provider.

I can configure attributes like the "minRequiredPasswordLength" and such in the web.config (as listed in http://msdn.microsoft.com/en-us/library/ff648345.aspx) but I can't find an attribute for setting the min UserName length.

Aside: We already have multiple UserName entries in the database with lengths as short as 2 characters that were imported by the developers during the initial site creation, so there doesn't appear to be any issue with having shorter UserName lengths. We are just unable to edit existing entries or add new users with less than 5 char UserNames using the CMS webforms.

1

1 Answers

1
votes

Minimum UserName length is not from Default ASP.NET Membership Provider.

Here are the properties of Membership Provider -

enter image description here

It must be from your application's business logic.

multiple UserName entries in the database with lengths as short as 2 characters that were imported by the developers during the initial site creation

Those users might have imported straight to Database without using the application. Or the constraint was implemented after creating those users.