The ASP.NET design assumes that providers are stateless. Therefore, you must design your provider in such a way that you do not need to know when it will be created and when it will die. Basically, if you really want to do this, you can put the actual logic in another class, that its creation and deletion will be handled by the proxy class that you enter in ASP.NET.
Additionally, ASP.NET does not guarantee when it will create the role provider object. This is something like static constructors. You should only rely on them to exist when they are needed.
source share