0
Fixed

Null reference exception when viewing individual entities in the entity search

Matthew Clark 12 years ago updated by anonymous 8 years ago 3

When attempting to view some individual entities in the entity search, I received the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connect.Web.EntitySerializer.<>c_DisplayClass5.<EntityDisplayValues>b_2(GroupedNameValueCollectionKey valueKey) in c:\workspaces\DEV\IdentityBroker\Source\Studio\Unify.Connect.Web\Extensions\Entity\EntitySerializer.cs:line 45
at System.Linq.Enumerable.ToDictionaryTSource,TKey,TElement(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Unify.Connect.Web.EntitySerializer.EntityDisplayValues(IEntity entity, IDictionary`2 schemaConfiguration) in c:\workspaces\DEV\IdentityBroker\Source\Studio\Unify.Connect.Web\Extensions\Entity\EntitySerializer.cs:line 41
at ASP._Page_Views_Shared_ViewEntity_cshtml.Execute() in c:\Identity Broker Web\Identity Broker\StandaloneWeb\Views\Shared\ViewEntity.cshtml:line 17
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c_DisplayClass1c.<InvokeActionResultWithFilters>b_19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

The first 20 entities do not seem to exhibit this behaviour and they correctly display the entities. Changing the page size of the entity search does not seem to alleviate this behaviour.

The values in the entity do not appear to affect this behaviour. Example values of an entity that displays correctly:

ea5ddc66-6aaa-4ed3-ad18-04e6a6e99b73
282
NULL
NULL
The 240
NULL
NULL
NULL
NULL
NULL
NULL
287
2
CN=240
The 240
NULL
NULL
287
OU=210

Example values of an entity that does not display correctly:

f2a9c808-28a2-4f42-8a64-7feb2807c1a3
293
NULL
NULL
The 270
NULL
NULL
NULL
NULL
NULL
NULL
282
2
CN=270
The 270
NULL
NULL
282
OU=240

The skip/take was being applied on the search for the entity to view, which meant that anything past the Default Skip/Take wouldn't be found.

Reassigned for confirmation of completion.

Confirmed complete.