How do I control MembershipProvider instance creation/lifetime?

前端 未结 2 883
暗喜
暗喜 2020-12-03 19:13

I have registered a custom MembershipProvider class in my Web.Config file. I\'m using Inversion Of Control using Castle Windsor and I have registered my custom MembershipPro

2条回答
  •  清歌不尽
    2020-12-03 19:58

    I just blogged about this with a solution.

    In a nutshell, this solution involves a simple, reusable MembershipProvider that calls the container to resolve your custom MembershipProviders. Unlike other solutions that use "BuildUp" container features, this one takes true control of instantiation, thus enabling constructor injection (which in turn enables immutability) and proxyability.

提交回复
热议问题