开发者

ASP.NET Membership provider

i have create a WCF service to handle ASP.NET membership. It's running ok using clear type password, but when i change password type into hashed, my service always return false when validating user,

oh, i have another winforms app that using the same database for it's membership provider and it's running well using clear or hashed password

and when i call reset password from both apps (using hashed password), they change the data in my database with different lenght of value. WCF 44 characte开发者_运维技巧r while WinForms app only 28 Chars.

so i'm really confused with what happened and wonder what have i done wrong


You cant just change it midway through. Decide on the scheme, and set up users afterwards.


Hi if you have already stored password in database you are not able to change password type. The already stored passwords aren't hashed and the validate user function will always return false.

For using multiple application on one database you have to make sure that all app's are using the same manner of hashing.


i've resolve this.
thanks to http://www.codeproject.com/KB/aspnet/LoginControlError.aspx

it's seem that i need to explicitly set HashAlgorithmType to "SHA1" in my app.config

another thing to mention here is that i'm using mysql as my backend database. so maybe this case will not happen using MS SQL Server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜