0

I have a project using asp.net mvc and form membership provider .

I have a Domain layer ( with Entities , Services , and repositories ) . I also have a UI layer ( with controllers , filters , IoC , ViewModels, views ).

what is the best place to put my FormMembershipProvider ?

dan_l
  • 1,692
  • 2
  • 23
  • 40
  • You might benefit from investigating my approach http://stackoverflow.com/questions/3964989/how-to-pass-current-user-information-to-all-layers-in-ddd/3969014#3969014 I'm avoiding `FormMembershipProvider` altogether. – Arnis Lapsa Feb 08 '11 at 10:03

1 Answers1

0

Membership is a concern of your web app not your domain so it should go in the web app (UI layer).

Matt Kocaj
  • 11,278
  • 6
  • 51
  • 79
  • 1
    It's not that simple. Provider itself should not live in domain, but knowledge about access rights should. Problem is - asp.net membership provider is quite invasive. – Arnis Lapsa Feb 08 '11 at 10:01
  • "but knowledge about access rights should"- i disagree. I believe the web app is a human interface to the business of the domain and as such mandates external [to the domain] concerns like authentication, roles/access/etc. While these external concerns make their way into the domain/data this is only due to the software acting as a solution. Without the software/web-app perhaps these concerns would not exist. I could be wrong here especially as MVC forces us into certain corners. Perhaps a Bounded Context is required in the domain to facilitate these MVC/web-specific concerns? – Matt Kocaj Feb 09 '11 at 02:10