I have a custom Membership and Role Provider that I am setting up within an application. In ASP .Net Webforms I utilize the same providers and when the app is compiled and run the providers are initialized because of the references in the web.config.
When I move this to MVC and put break points in my "Initialize" methods for these classes the breaks are not hit.
An oddity: If I utilize the "[Authorize(Roles = "MYROLE")]" process within a controller and hit that Action it then goes out to the Roleprovider and calls the "GetRolesForUser" automatically but still never hits the initialize. This is an issue since I need to have certain varibles set up prior to calling any methods.
I know I can call "Initialize" directly but would have thought this would have been done automatically as it was in ASP Webforms.
Do I have to manually initialize these in MVC or am I missing something?