开发者

Valid username characters using SQL provider for ASP.NET membership

开发者 https://www.devze.com 2022-12-25 05:43 出处:网络
What are the valid characters for a user name when using the SQL prov开发者_JAVA技巧ider for ASP.NET membership?It\'s any character except for commas (,). The only other restriction is your database e

What are the valid characters for a user name when using the SQL prov开发者_JAVA技巧ider for ASP.NET membership?


It's any character except for commas (,). The only other restriction is your database encoding settings.

You can view the source for the SqlMembershipProvider.CreateUser method, and the aspnet_Membership_CreateUser stored procedure in the database to verify.

Edit, further evidence:

http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.updateuser.aspx

[An exception is thrown if] the UserName property of user is an empty string (""), contains a comma, or is longer than 256 characters.

0

精彩评论

暂无评论...
验证码 换一张
取 消