views:

2070

answers:

1

My question, is it possible to build customer membership and role providers (overriding the asp.net providers) when using asp.net mvc?

I am guessing it is possible but have not seen any information about it.

Would it be done the same way as in asp.net? Just changing the web.config to point to a new provider and then providing the override methods?

I have found many articles discussing changing the data source of the membership and role providers but I don't like the tables that asp.net uses so I usually use my own table structure.

If you have any articles or links that talk about this that would be great.

+7  A: 

Yep, the providers are exactly the same and work just like they do in "regular" asp.net.

Nick DeVore
Thanks. Have you tried it by any chance? I'm still getting use to MVC and have not gotten around to the authentication part yet.
metanaito
Yeah, in testing I'm using the SQLProvider against their typical ASPNET database. However in production, I use the ActiveDirectory authorization pieces. It was just a matter of switching providers in web.config and it all works perfect.
Nick DeVore
I use the lightweight PAB.Web.Providers I got from an eggheadcafe.com article in my MVC project and they work as expected.
Ben Robbins
Thank you. I'm looking forward to trying it out.
metanaito