2

Is there some code already done that would support the old Membership MVC3 with the new OWIN? I am looking for the UserStore, UserManager, SignInManager that would merge the gap with the old database structure.

jsgoupil
  • 3,788
  • 3
  • 38
  • 53

2 Answers2

2

I have implemented everything to talk to the old database but with the OWIN architecture. I wrote a blog post about it.

http://blog.jsgoupil.com/asp-net-membership-to-owin/

jsgoupil
  • 3,788
  • 3
  • 38
  • 53
1

No. Membership is inherently incompatible with Owin because Membership is based on a Static class with Static initialization that falls outside of the Owin pipeline.

That's not to say you can't use Membership in an MVC app that uses Owin, but you can't use Membership through Owin in the ways that Owin is designed for. Membership is just a global static variable that is very difficult to test and use properly.

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
  • Based on the popularity of my question, I expected to get such answer. However, I have been working in writing my own SignInManager, Store, etc. and I believe it will work fine. I'll write a blog post about this. – jsgoupil Jan 23 '15 at 12:17
  • @jsgoupil - How exactly will that make Owin use the Membership framework? – Erik Funkenbusch Jan 23 '15 at 16:09
  • Well, I'm working on it. Talk to the Microsoft guys and will post a blog about it. – jsgoupil Jan 27 '15 at 15:10