1

我在MVC会员中遇到了一些问题,这些问题正在使我失望。我在我的网站上使用Facebook的OAuth,它工作正常,除非;如果用户名(在这种情况下名和姓)中含有“我”,我得到这个错误页面的mysite /帐号/ ExternalLoginConfirmation:提供的用户名无效

Server Error in '/' Application. 

The username supplied is invalid. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.Security.MembershipCreateUserException: The username supplied is invalid. 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

只是要更清楚,如果用户名是“元布朗”它如果用户名是“Hail Brown”或者我收到上面的错误,那么它是完美的。

,并在mysite的/帐号/注册页面,如果我选择的用户名,如“冰雹”,我得到这个exclamtaion:

The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator. 
当我通过Facebook注册,如果用户名包含字符

底线“我”我的webpages_OAuthMembership表保持空白,当我通过MVC会员系统注册时,我的webpages_Membership表保持空白。

我还增加了对非拉丁字符的控制:

 [Required] 
     [RegularExpression(@"^([a-zA-Z0-9]+)$", ErrorMessage = "Please use Latin characters only.")] 
     [Display(Name = "User name")] 
     public string UserName { get; set; } 
+0

我不明白'i'是一个拉丁字符。 –

+0

这就是为什么我问...不是它被烧了吗? :/ – Cromwell

+0

在这一点上,我会从scrach开始你的配置过程。因为在导致这个错误的单词中使用'i'使得零没有意义。 –

回答

0

你必须改变用户名字段在USERPROFILE表到拉美。它应该解决问题。

它应该是这个样子:

Latin1_General_CI_AS

相关问题