本文介绍了ASP.NET MVC4 WebSecurity.ConfirmAccount(字符串标记)的长到int转换异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎让我感到困惑。我正在使用MVC4简单会员资格,以帮助自动化我的帐户流程。一切似乎都没问题,除非我调用WebSecurity.ConfirmAccount(字符串标记)和WebSecurity.ResetPassword(字符串标记,字符串newPassword)方法。当传递给用户生成的正确令牌但是执行没有错误并且在使用错误令牌传递时返回false时,方法抛出和转换为long的异常转换错误。我犯了什么错误?

This seems to be a confusion to me. I'm working with MVC4 Simple membership just to help automate my Account process. all seems ok except when i invoke the WebSecurity.ConfirmAccount(string token) and WebSecurity.ResetPassword(string token, string newPassword) methods. both method throw and exception of long to in conversion error when passed with the correct token generated for the user but execute without error and return false when passed with the wrong token. Am i making any mistake?

推荐答案


这篇关于ASP.NET MVC4 WebSecurity.ConfirmAccount(字符串标记)的长到int转换异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:00