Always getting anonymous identity using OpenAccessMembership37Provider in Sitefinity 8 (default provider in parrallel)
I hav to use both the lagacy and default membership provider on the site. So I enabled the OpenAccessMembership37Provider in sitefinity's backend.
After I've managed to imort the users from an old sitefinity site into the the new, I encountered a rather strange issue:
I am actually able to log in using an imported user's credentials. I use a trial-and-error approach to find out about the provider to use:
User user = null;UserLoggingReason result;var providerName = UserManager.GetDefaultProviderName();var userId = SecurityManager.GetUserId(providerName, input.UserName);if (userId.Equals(Guid.Empty)) providerName = "OpenAccessMembership37Provider"; userId = SecurityManager.GetUserId(providerName, input.UserName);if (userId.Equals(Guid.Empty)) result = UserLoggingReason.Unknown;else result = SecurityManager.AuthenticateUser( providerName, input.UserName, input.Password, input.RememberMe, out user);The setup in my web.config is:
<membership defaultProvider="Default"> <providers> <clear /> <add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity" /> <add name="OpenAccessMembership37Provider" type="Telerik.Sitefinity.Modules.Migration.Security.Data.OpenAccessMembership37Provider, Telerik.Sitefinity.Migration"/> </providers></membership>So I've been looking arround for a possibility to try out both providers when retrieving the current identity (similar to the login procedure), but havent found so far. My best guess was this might be a type of a caching issue, but if so, why does this work with the default provider? Is there something wrong with my setup?
Hello,
I have noticed that you have already opened a support ticket for this issue. I suggest we continue the communication there and once we have the solution figured out feel free to post it here for the community.
Regards,
Velizar Bishurov
Telerik