I have read about not being able to use a .NET Custom Membership with Castle Windor. Is this the case? Are there any work arounds?
Asked
Active
Viewed 344 times
-1
-
duplicate: http://stackoverflow.com/questions/1003587/how-to-integrate-ioc-membership-provider-with-asp-net-mvc http://stackoverflow.com/questions/4193484/how-do-i-control-membershipprovider-instance-creation-lifetime – Mauricio Scheffer Feb 08 '11 at 12:56
1 Answers
0
There are always workarounds. In this case you have to implement a proxy pattern. You need to create an interface & an implementing object that proxies calls to the membership class.
There are also some interesting blogs about duck typing with windsor. By using duck typing could eliminate the need to create the proxy object yourself. You would only have to write an interface containing the methods you want to use from the membership class and Castle would take care of proxying the calls for you (but essentially it's the same pattern).

kelloti
- 8,705
- 5
- 46
- 82
-
1You can't directly proxy providers with DynamicProxy because you can't directly take control of their instantiation. – Mauricio Scheffer Feb 08 '11 at 12:59