November Happy Hour will be moved to Thursday December 5th.

5.1.422: Can't find provider capability information for provider [XYZ].

Vote:
 
I noticed that there is a problem with using ASP.NET membership providers. When going to edit mode you get the following exception: [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) +1201 The 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
#15796
Sep 28, 2007 22:04
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.