I'm writing a custom membership provider that calls our internal service. The problem is when custom membership provider is first it doesn't failback to sql. It works well if sql is first, but I need the custom provider to be first for performance reasons. This is part of my test web.config.
You need to change provider2="CloudNineMembershipProvider" to provider1="CloudNineMembershipProvider" and provider1="SqlServerMembershipProvider" to provider2="SqlServerMembershipProvider". Notice the number in the attribute, it's not the order of the attributes in web.config, it's the attribute names.
I have done that. This is exacly when the error occurs. SqlServerMembershipProvider doesn't work then.
Is there a way to debug this?
The workaround to debug this would be to disassemble EPiServer.Security.MultiplexingMembershipProvider and switch the namespace in web.config from:
to your own type.
Then you should be able to figure out what actually executes.
Check as well, if your role providers are set correctly, in particular providerMap1, providerMap2, providerMap3...
It's worth bearing in mind that you can configure different sets of membership providers for different environments. Assuming your high performance provider is only required for the front end then you can simply use this provider and configure the SqlMembership provider out.
For your edit/admin you can multiplex and/or use the SqlMembership provider only.
awesome ! :)