I have read through all the related questions, but I still unable to get the right solution for some reason, something is not right on my side, but not sure what\'s causing
I had a problem some time ago with this Initialize() method, I will post it here it may be helpful for someone.
Let's imagine you have the implementation of your custom provider on:
MyEnterprise.MyArea.MyProviders.CustomProvider
And what you want is use the method GetUserNameByEmail which is inside the provider implementation. There are two ways to call this method, through:
MyEnterprise.MyArea.MyProviders.CustomProvider.GetUserNameByEmail(email)
Which will not fire the Initialize method as you are calling it by yourself, on the other hand if your call is:
Membership.GetUserNameByEmail(email)
The Initialize method will be called if necessary, I assume this is on the base constructor or something (didn't dig more).
Hope this helps. - E.