Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
It should catch the ProviderException. You can remove ContactRequestHandler in baf.data.manager.config to see if that helps but you will need to cleanup related references manually
I don't think the exception is handled in PreDelete. Sounds like a bug for me. I will file a report and we will look into it.
We've been experiencing errors when deleting users since moving to ASP.NET Identity. We are able to delete the user using the UserManager just fine, but cannot delete the contacts. We get the following exception since implementing ASP.NET Identity in the same fashion as described here.
[ProviderException: Default Membership Provider must be specified.] System.Web.Security.Membership.InitializeDefaultProvider(Boolean initializeDefaultProvider, MembershipSection settings) +10174203 System.Web.Security.Membership.Initialize() +455 System.Web.Security.Membership.get_Provider() +9 System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +41 Mediachase.Commerce.Customers.CustomerContext.GetUserForContactId(PrimaryKeyId customerContactId) +164 Mediachase.Commerce.Customers.Handlers.ContactRequestHandler.PreDelete(BusinessContext context) +211 Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.PreExecute(BusinessContext context) +612 Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.PreExecute(BusinessContext context) +51 Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute(Request request) +496 Mediachase.BusinessFoundation.Data.Business.BusinessManager.Delete(EntityObject entityObject) +72 EPiServer.Reference.Commerce.Site.Features.Login.Controllers.LoginController.DeleteUsers() in C:\dev\Quicksilver\Sources\EPiServer.Reference.Commerce.Site\Features\Login\Controllers\LoginController.cs:75
The code in question was added to Quicksilver LoginController Index to confirm that it wasn't a configuration issue in my project. The Guid for the contact of a new user I created from the admin area on Quicksilver. Nothing else has been modified from Quicksilver 10.8.
private void DeleteUsers() { var myGuid = new Guid("128ED95A-6D32-4745-9930-F3BA8A7CC502"); var contact = CustomerContext.Current.GetContactById(myGuid); if (contact != null) { BusinessManager.Delete(contact); } }
Is there a fix for this or anything I should be doing differently? I noticed another post with this error, but during authentication and not deletion. There is no follow up post either with a resolution.