Hmm... Have tried to use the YAF providers in my MVC3 project with the help of tha_watcha's sample...
Since I am doing an MVC3 site project, I have a kind of challenge using YAF seamlessly...
MVC and Web Forms do not mix very well...
What I have done is to add a reference to the existing /forum/bin/YAF.dll to my MVC project, replace the default forms auth/membership/role/profile tags with the ones used in YAF in the MVC project web.config - and moved my project connectionstrings to the YAF db.config file (and replaced the strings in the MVC3 web.config with a configSource pointing at forum\db.config).
This worked great, I could log on using the MVC3 Account Controller, as well as YAF using the YAF membership...
Unfortunately I could only be logged in on either the MVC3 pages (via AccountController) or YAF (via YAF login), mutually exlcusive... If I logged in with MVC3, I got logged out from YAF and vice versa....
Took a little walk outside, and remembered that someone had mentioned machine key settings in some context regarding this exclusive login problem somewhere in this forum...
So I reconfigured the machine key settings in IIS for the site, and suddenly both login methods worked in harmony...
I can login now via the MVC3 AccountController which gives me a logged in status also in YAF, and a YAF login also logs me in on the MVC3 site...
That's "good enough" for me right now, since I can now check "logged in as a forum member" also on the MVC site to enable "member-only features"
A real breakthrough for me.. A small step for pro web devs but a giant leap to me...
Will have to make a separate "available site member features" xref table for logged in forum members, but that has nothing to do with YAF.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]