A critical vulnerability was discovered in React Server Components (Next.js). Our Systems Remain Fully Protected. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our Systems Remain Fully Protected. Learn More.
[EPiServerException: Can't find provider capability information for provider [XYZ].] EPiServer.Security.ProviderCapabilities.IsSupported(String providerName, Action action) +117 EPiServer.UI.Edit.UserMembership.EnableFields() +418 EPiServer.UI.Edit.UserMembership.OnLoad(EventArgs e) +1201The reason is because EPiServer only has hardcoded the capabilites for some of the default providers name like this:static ProviderCapabilities() { _providerDictionary = new Dictionary();
_providerDictionary.Add("SqlServerMembershipProvider", new ProviderCapabilitySettings(true, true, true, new object[] { "email", true, "comment", true }));
_providerDictionary.Add("WindowsMembershipProvider", new ProviderCapabilitySettings(false, false, false, new object[] { "email", true, "comment", false }));
_providerDictionary.Add("SqlServerRoleProvider", new ProviderCapabilitySettings(true, true, true));
_providerDictionary.Add("WindowsRoleProvider", new ProviderCapabilitySettings(false, false, false));
}
To get it to work if you have providers with other names you must obviously register them manually (at least until EPiServer provides a better sollution) in Global.asax.cs.private void RegisterCapabilitiesOnMembershipProviders() { string defaultMembershipProviderName = ProviderFacade.GetDefaultMembershipProviderName(); string defaultRoleProviderName = ProviderFacade.GetDefaultRoleProviderName(); ProviderCapabilities.AddProvider(defaultMembershipProviderName, new ProviderCapabilitySettings(false, false, false, new object[] { "email", true, "comment", false })); ProviderCapabilities.AddProvider(defaultRoleProviderName, new ProviderCapabilitySettings(false, false, false)); } protected void Application_Start(Object sender, EventArgs e) { RegisterCapabilitiesOnMembershipProviders(); }/Fredrik http://blog.fredrikhaglund.se