当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net membership - Error in SqlMembershipProvider.GetPasswordWithFormat

问题描述:

I have the following error in my asp.net login page:

Unable to cast object of type 'System.Int32' to type 'System.String'

with stack trace:

at System.Data.SqlClient.SqlBuffer.get_String()

at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate)

at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)

at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)

at System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)

at System.Web.UI.WebControls.Login.AttemptLogin()

at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)

at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The error is not occured every time.

Any ideas?

分享给朋友:
您可能感兴趣的文章:
随机阅读: