Why InitializeSimpleMembershipAttribute in MVC 4 app

后端 未结 7 1877
误落风尘
误落风尘 2020-12-29 05:07

I think my understanding on SimpleMembershipProvider is almost 60% and the rest is getting to know how it internally work.

You can quickly found some is

7条回答
  •  天命终不由人
    2020-12-29 05:44

    I knocked my head on the walls for a day trying to figure out why my Role.GetRoleForUser failed. It was because of the LazyInitializer not getting called.

    So, like Matt said, just put it in App_Start to make sure you have no issues.

提交回复
热议问题