LoadProfileTable: System.NullReferenceException
26/07/2014 Leave a comment
Symptoms;
After installing sp1 on SharePoint server 2013 , unable to edit profile page (/_layouts/15/EditProfile.aspx)
When we click to edit a profile from browser for any user we were getting a System.NullReferenceException inside EditProfile.aspx in Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable() function .
07/24/2014 08:51:48.25 w3wp.exe (0x0038) 0x2D10 SharePoint Portal Server User Profiles ahn7r Unexpected ProfileUI: Unhandled exception inside LoadControl: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable() at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadControl(Object sender, EventArgs e) 7998a79c-d0ea-60b0-5709-9a7c7d8739a5
07/24/2014 08:51:48.25 w3wp.exe (0x0038) 0x2D10 SharePoint Foundation Runtime tkau Unexpected System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadProfileTable() at Microsoft.SharePoint.Portal.WebControls.ProfileUI.LoadControl(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 7998a79c-d0ea-60b0-5709-9a7c7d8739a5
Cause:
According to design of editprofile.aspx in LoadProfileTable() function , a property should in a section first. If you change the order of the properties (in a ProfileSubType) top of the first section this problem has occurs .
Resolution :
Move the properties in User Profile Service Application -> Manage User Properties page at least under a section .
Use following SQL to check the for the ProfileSubTypeId=1 the properties is top of the first Section .
SELECT B.PropertyName, A.*
FROM [ProfileDB2].[dbo].[ProfileSubtypePropertyAttributes] A
Join [ProfileDB2].[dbo].[PropertyList] B on A.PartitionID = B.PartitionID and A.PropertyID = B.PropertyID
Where ProfileSubTypeId=1
Order by A.DisplayOrder
*Test also other ProfileSubTypeId’s
The idea is simple , As by design every User Property must be under in a Section . This is a well know issue by Microsoft.