Hi guys,
first of all: yaf is great and I have a live forum running for years now. I still can count the times I needed to spend time to do some maintainence on it with one hand. Awesome!
For a new Project I am now struggeling on something which seems to be a bit of a bigger problem.
I am using ASP.NET MVC4 (razor) with Simplemembership and Simpleroles. Data is stored on SQL Server 2008 R2 Express (will be full SQL Server on live site) and data access is made with Entity Framework 5 (which is quite cool).
I want to integrate YAF into my site, which is a bit of a pain. First I had a look at the sample Integration application, but it's not MVC so it does not help at all. So - what are other plans of (pseudo)integrating? I came up with the following Ideas and I'm wondering if they are any good.
1. Synchronizing Tables
The basic Idea is that Username and Password (and Avatars for that reason) are managed by my app and are only changed by my app. Changes made to my Database would be done to the YAF.NET Database too. I don't like that Idea too much because it has several obvious drawbacks - e.g. I have to find a way to ensure data is consistant and this solution does not provide SSO.
2. Let YAF use Simplemembership directly
I tried this one and got stuck with the Database not initialized error. I still did not figured out a good place to do this initialization. After All, it's a one-liner that should do the trick. But even if this does work, I am not sure if it will also do correctly with the SimpleRoleProvider - but this sould be working with the least amount of modifying the YAF sources directly. If you can point out a nice place to do this initializing thing (it must be called on every request) I would greatly appreciate this.
3. Let my App use YAF Memebership
I think this would be an easy one, I just have to swap out Simplemembership and swap in YAF Membership, but to do this I would have to heavvily alter my Database layout and rework nearly all FK Constraints. There has to be another way.
4. Reworking YAFs Membership Provider
This would include rewriting all the crypto stuff from scratch to do something reasonable and supporting modern password cryptography such as PBKDF2SHA1/256/512. Also I'd need to rework the stored procedures to use my custom Users table.
Did I miss something?
In the yaf sources I grabbed from github (I still don't get the github hype btw) I found a Membership Passthrough Provider, but using this still does not eliminate the need of calling the Database initialization.
Any help woud be greatly appreciated.