Tuesday 15 November 2011

An unexpected error has occurred with webparts

I have configured Codeplex's SharePoint 2010 FBA pack in my SharePonit environment and it’s all worked for me in default zone.
Extended the FBA SharePoint application, in internet site received an error with a SharePoint page that has web parts. The immediate fix is to delete the web part and re-add it, but that's not a real workaround.
If after deleting and re-adding the web part i still receive the unexpected error.


I checked in ULS logs with above Corelation ID:

System.Web.HttpException: Could not find the specified membership provider. at System.Web.UI.WebControls.LoginUtil.GetProvider(String providerName) at System.Web.UI.WebControls.CreateUserWizard.get_QuestionAndAnswerRequired() at System.Web.UI.WebControls.CreateUserWizard.UpdateValidators() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.WebControls.Wizard.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at Visigo.Sharepoint.FormsBasedAuthentication.MembershipRequestWebPart.AddCreateUserControl() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The error message said the web part tried to find a membership provider from the configuration file. However, it was not found.

After long search i posted into MSDN blog and got the solution from Jinchun Chen.

To fix the this issue, As i mentioned, the issue happened in the extended web application, i have configured the membership provider in the web.config(IIS --> share point site --> Providers) for the extended web.config too.

Here are a discussion from another site, which may help us to understand this issue.

No comments:

Post a Comment