YAFLogo

idiotboi89
  • idiotboi89
  • 53% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
Hi there,

I am currently trying to create a simple ASP.NET page to login using the same database the YAF is using.

I tried to hash my password with md5, and compared to my password as stored in YAF database, however the values are different.

if my login using the YAF database is successful, i will then move on to create a cookie for auto login in the forum itself.

Can anyone guide me on how does YAF encrypt / Hash the password when i first register?

should i use the yaf membership table or yaf user table?

Thanks alot.

Sponsor

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
12 years ago
YAF Membership tables....

Edit your web.config in a text editor and look for MembershipProvider section, that will tell you what hash method you are using. The Membership Provider provides all methods of access and checking passwords so you shouldn't have to do this manually; you just need to include the same provider settings in your project.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

idiotboi89
  • idiotboi89
  • 53% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
Mek wrote:

YAF Membership tables....

Edit your web.config in a text editor and look for MembershipProvider section, that will tell you what hash method you are using. The Membership Provider provides all methods of access and checking passwords so you shouldn't have to do this manually; you just need to include the same provider settings in your project.

Thanks for the advise.

So if i am not wrong, i have to find a way to implement YAF membershipProvider into my project which is ASP.NET with Visual basic, and just use the method inside.

Now creating new empty project and trying it out.

Sorry i am being a newbie 🙂

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
12 years ago
Yup; you just need to include the same provider configuration from our web.config into yours. Then its just using the BuiltIn methods like System.Web.Security.Membership.CreateUser(..)

Lots of examples of this on google, if you search for information on using Membership Providers (or roles/profiles).


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

idiotboi89
  • idiotboi89
  • 53% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
thanks for all the help !

i have currently managed to reference the classes

now that i can have membership object.. i'm not sure where to find how they encrypt the password or use what function to test the login against the database =)

any suggestions on this ?

mddubs
  • mddubs
  • 100% (Exalted)
  • YAF Developer
12 years ago
This tutorial covers almost everything you need to know about the .NET Membership Framework:

http://www.4guysfromrolla.com/articles/120705-1.aspx 


UserPostedImage 

www.bunkerhollow.com  | www.careercomputing.com 

When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )