WebSecurity.ResetPassword无法工作

时间:2014-10-14 14:00:42

标签: asp.net-mvc asp.net-mvc-4

我有MVC4应用程序,我正在使用默认会员资格。我已将UserId从int更改为Bigint。当我使用令牌和新密码调用WebSecurity.ResetPassword时,它显示错误:

Cannot implicitly convert type 'long' to 'int?'. An explicit conversion exists (are you missing a cast?)
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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'long' to 'int?'. An explicit conversion exists (are you missing a cast?)

Source Error:

   Dim newpassw As String = mdl.Password
   Dim response As Boolean = WebSecurity.ResetPassword(mdl.PasswordResetToken, newpassw)

当我将UserId从Bigint更改为int其工作正常。
但我需要Bigint而不是int for userId在数据库中。如何为Bigint做Websecurity.ResetPassword?

0 个答案:

没有答案