Monday, 25 March 2013

SharePoint 2013 - Fix for Exception - Microsoft.SharePoint.SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

I received the following exception when creating new custom field types in SharePoint 2013. I couldn't even open the List Settings page (via the Web UI, SharePoint Designer or SharePoint Manager).

To resolve, you simply have to rename any potentially problematic custom field types e.g. rename fldtypes_MyCustomField.xml to zzfldtypes_MyCustomField.xml". You can find your field types located in %Program Files%Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\XML. Restart IIS after each rename.

This will get you back up and running - and you will now know what custom SharePoint field type is causing the issue.

Full Exception Details as below:

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) ---> System.Runtime.InteropServices.COMException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))   
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFieldTypeInfo(String bstrUrl, Boolean bInternal, Object& pvarTypeNames, Object& pvarTypeDisplayNames, Object& pvarTypeShortDescriptions, Object& pvarBaseRenderingTypeNames, Object& pvarFieldTypeClasses, Object& pvarFieldEditorUserControls, Object& pvarPropertySchema, Object& pvarTypeInfoFlags)   
at Microsoft.SharePoint.Library.SPRequest.GetFieldTypeInfo(String bstrUrl, Boolean bInternal, Object& pvarTypeNames, Object& pvarTypeDisplayNames, Object& pvarTypeShortDescriptions, Object& pvarBaseRenderingTypeNames, Object& pvarFieldTypeClasses, Object& pvarFieldEditorUserControls, Object& pvarPropertySchema, Object& pvarTypeInfoFlags) -
-- End of inner exception stack trace ---   
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)   
at Microsoft.SharePoint.Library.SPRequest.GetFieldTypeInfo(String bstrUrl, Boolean bInternal, Object& pvarTypeNames, Object& pvarTypeDisplayNames, Object& pvarTypeShortDescriptions, Object& pvarBaseRenderingTypeNames, Object& pvarFieldTypeClasses, Object& pvarFieldEditorUserControls, Object& pvarPropertySchema, Object& pvarTypeInfoFlags)   
at Microsoft.SharePoint.SPFieldTypeDefinitionCollection..ctor(SPWeb web, Boolean internalCall)   
at Microsoft.SharePoint.SPField.GetFieldTypeDefinitionForType(SPFieldCollection fields, String strType)   
at Microsoft.SharePoint.SPField.get_FieldTypeDefinition()   
at Microsoft.SharePoint.SPField.get_TypeDisplayName()   
at ASP._layouts_15_listedit_aspx.__Render__control13(HtmlTextWriter __w, Control parameterContainer)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at Microsoft.SharePoint.WebControls.AjaxDelta.RenderChildren(HtmlTextWriter output)   
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)   
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)   
at Microsoft.SharePoint.WebControls.AjaxDelta.Render(HtmlTextWriter writer)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)   
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)   
at Microsoft.SharePoint.WebControls.SharePointForm.Render(HtmlTextWriter output)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)   
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)   
at System.Web.UI.Page.Render(HtmlTextWriter writer)   
at Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter writer)   
at Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer)   
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)   
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)   
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   
at System.Web.UI.Page.HandleError(Exception e)   
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   
at System.Web.UI.Page.ProcessRequest()   
at System.Web.UI.Page.ProcessRequest(HttpContext context)   
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

DDK

No comments: