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

相關問題