We have upgraded FNMS from 2020R1 to FNMS2022R1. Till now everything seems to be ok except for an unexpected error while accessing the Asset module.
Below is the error from WebUI log, Do any suggestions on what is causing this issue
==================================
[ERROR 2022-10-30 01:37:57,569 472610ms GET /Suite/Assets/List/All XXYYZ\xxx_fnmp_prod UnhandledErrors ] An unexpected error occurred (444a9367-ef14-4c41-81a0-190c159b709d)
System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at DevExpress.Xpo.Metadata.ReflectionClassInfo.QueryOwnMember(String memberName)
at DevExpress.Xpo.Metadata.XPClassInfo.FindMember(String memberName)
at DevExpress.Xpo.Metadata.XPClassInfo.GetMember(String memberName)
at ManageSoft.Database.Xpo.XpoSession.OverrideSortColumn(Type p_ObjectType, String p_Column, Func`2 p_SortSqlFunc)
at Flexera.Web.Core.Display.UiHelper_Grid.OverrideSortValueRangeColumn(String columnName, Type propertyType, XpoSession session, Type elementType, IEnumerable`1 dataSource)
at Flexera.Web.Core.Display.UiHelper_Grid.ConfigureRangeColumn(UiHelper ui, MVCxGridViewColumn column, ModelMetadata propertyMetadata, GridCustomSettings settings)
at Flexera.Web.Core.Display.UiHelper_Grid.ConfigureColumns(UiHelper ui, GridCustomSettings settings, Boolean allowScrolling)
at Flexera.Web.Core.Display.UiHelper_Grid.ConfigureGrid(UiHelper ui, GridCustomSettings settings, Func`2 noResultsRazor, Boolean allowScrolling, Boolean delayLoad, Boolean showAllRecords)
at Flexera.Web.Core.Display.UiHelper_Grid.<>c__DisplayClass16_0.<Grid>b__0(GridCustomSettings settings)
at Flexera.Web.Core.Display.DevExpressHelper.GridViewCustom(ExtensionsFactory factory, Action`1 method)
at Flexera.Web.Core.Display.UiHelper_Grid.RenderGridInternal(UiHelper ui, IViewModel modelType, IEnumerable modelList, Action`1 customSettings, GridCustomSettings baseSettings)
at Flexera.Web.Core.Display.UiHelper_Grid.RenderGrid(UiHelper ui, IViewModel modelType, IEnumerable modelList, Action`1 customSettings, GridCustomSettings baseSettings)
at Flexera.Web.Core.Display.UiHelper_Grid.GridForModel(UiHelper ui, Func`2 toolbarRazor, Func`2 noResultsRazor, Boolean allowSelection, Boolean crossPageSelection, Boolean showFilter, Boolean showSearch, Boolean delayLoad, Boolean showToolbar, GridCustomSettings baseSettings)
at ASP._Page_Views_Assets_List_Grid_cshtml.Execute() in c:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\WebUI\Views\Assets\List_Grid.cshtml:line 52
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at Flexera.Web.Core.Display.WebViewBase`2.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.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.<Wrap>b__3()
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter)
at System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues)
at ASP._Page_Views_Assets_List_cshtml.Execute() in c:\Program Files (x86)\Flexera Software\FlexNet Manager Platform\WebUI\Views\Assets\List.cshtml:line 64
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at Flexera.Web.Core.Display.WebViewBase`2.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.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.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
Oct 30, 2022 01:28 AM
This is likely caused by a mismatch between uppercase and lowercase names appearing in different places for a custom property you have configured. Take a look at the following article for guidance on how to remediate this: Asset views may be inaccessible if custom property names have mismatched case between AssetTypeProperty_MT and UIItem_MT tables (IOJ-2172965)
Also see the following forum threads for other related discussion:
Oct 30, 2022 06:30 AM
@ChrisG I do follow the steps given in the article, I first run the script and found some of the property name values are case sensitive, so I ran the second code and checked 1st script again now its all empty.
Now I am getting a red bar error and an unexpected error message is gone.
An error has occurred while retrieving information; you may need to refresh the page.
Error ID: 4b77dcee-e5f7-4080-a42f-3c571fedeca2
[ERROR 2022-10-30 23:44:11,361 23379233ms POST /Suite/Assets/List_Grid query=All XXYYZ\xxx_fnmp_prod UiHelper_Grid ] Error retrieving data (4b77dcee-e5f7-4080-a42f-3c571fedeca2)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> DevExpress.Xpo.DB.Exceptions.SqlExecutionErrorException: Executing Sql 'SELECT TOP 1 count(*)
FROM (SELECT main.*,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (124, 143, 114, 117, 120, 149, 108, 200, 144, 97, 171, 179, 206, 258, 240, 234, 264, 228, 252, 246) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-IMEI,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (247, 253, 229, 265, 235, 241, 259, 207, 199, 172, 113, 142, 201, 98, 134, 130, 151, 145, 137, 109) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-MACAddress,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (146, 128, 133, 178, 110, 126, 147, 202, 122, 99, 173, 177, 208, 260, 242, 236, 266, 230, 254, 248) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-PhoneNumber,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (249, 255, 231, 267, 237, 243, 261, 209, 198, 174, 100, 115, 203, 136, 119, 148, 195, 127, 112, 135) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-PIN,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (154, 116, 132, 194, 150, 111, 139, 204, 131, 101, 175, 197, 210, 262, 244, 238, 268, 232, 256, 250) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-PUK,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (227, 226, 225, 224, 155, 156, 223, 222, 221, 211, 164, 163, 106, 105, 158, 104, 153, 125, 157, 103, 138, 102) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-RemedyNumber,
(SELECT MAX(NULLIF(LTRIM(RTRIM(pv.PropertyValue)), '')) AS PropertyValue FROM dbo.AssetPropertyValue AS pv WHERE pv.AssetID = main.AssetID AND pv.AssetTypePropertyID IN (152, 121, 140, 193, 118, 123, 141, 205, 129, 107, 176, 196, 212, 263, 245, 239, 269, 233, 257, 251) GROUP BY pv.AssetID) AS CustomProperty_AssetTypeProperty_XYX-SIM
FROM dbo.Grid_AssetListModel AS main) [N0]' with parameters '' exception 'System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near '-'.
Oct 30, 2022 07:57 AM
This output now suggests that you have a "-" character in several custom property names.
The Custom Properties page gives the following guidance on custom property names:
Use only characters in the following ranges:a
-z
,A
-Z
,0
-9
, and underscore (_
). (Specifically do not use a dot or dash.)
Here are some things to consider about fixing this:
INSERT AssetPropertyValue(AssetTypePropertyID, AssetID, PropertyValue, CreationUser,CreationDate, UpdatedUser, UpdatedDate)
SELECT new_atp.AssetTypePropertyID, apv.AssetID, apv.PropertyValue, apv.CreationUser, apv.CreationDate, apv.UpdatedUser, apv.UpdatedDate
FROM AssetTypeProperty old_atp
JOIN AssetPropertyValue apv ON apv.AssetTypePropertyID = old_atp.AssetTypePropertyID
JOIN AssetTypeProperty new_atp ON new_atp.AssetTypeID = old_atp.AssetTypeID
WHERE old_atp.PropertyName = 'OldName'
AND new_atp.PropertyName = 'NewName'
EXEC dbo.RemovePropertyFromWebUI @TargetTypeID = 9 /* asset */, @Name = 'OldName', @DeleteFromDB = 1
Oct 30, 2022 07:08 PM - edited Nov 08, 2022 08:53 PM