Master Data Web: startIndex cannot be larger than length of string

  • At the Master Data web app, in the Security section, when I go to edit a user or group in the Model tab, I get the error message:  startIndex cannot be larger than length of string.  Does anyone have any thoughts?

    Thanks

    the full error message is:

    Server Error in '/MasterData' Application.

    --------------------------------------------------------------------------------

    startIndex cannot be larger than length of string.

    Parameter name: startIndex

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.

    Parameter name: startIndex

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentOutOfRangeException: startIndex cannot be larger than length of string.

    Parameter name: startIndex]

    System.String.Substring(Int32 startIndex, Int32 length) +14793920

    System.Linq.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x) +23

    System.Linq.WhereSelectArrayIterator`2.MoveNext() +78

    System.Linq.Buffer1..ctor(IEnumerable1 source) +152

    System.Linq.Enumerable.ToArray(IEnumerable`1 source) +91

    Microsoft.MasterDataServices.Core.BusinessLogic.Security.ToModelPrivileges(DataTable table, ResultType resultType) +1638

    Microsoft.MasterDataServices.Core.BusinessLogic.Security.GetModelPrivilege(RequestContext context, Int32 principalId, SecurityResolutionType resolutionType, PrincipalType principalType, ResultType resultType, Collection`1 results) +213

    Microsoft.MasterDataServices.Core.BusinessLogic.Security.PopulateModelPrivilege(RequestContext context, Collection`1 users, SecurityResolutionType resolutionType, ResultType resultType) +325

    Microsoft.MasterDataServices.Core.BusinessLogic.Security.GetUserSecurity(RequestContext context, SecurityPrincipalsCriteria criteria, OperationResult results, Boolean pruneDenies) +751

    Microsoft.MasterDataServices.Core.BusinessLogic.Security.GetSecurityPrincipal(RequestContext context, SecurityPrincipalsCriteria criteria, SecurityPrincipals principal) +482

    Microsoft.MasterDataServices.Services.Service.SecurityPrincipalsGet(SecurityPrincipalsGetRequest request) +149

    Microsoft.MasterDataServices.WebUI.ServiceAdapter.ExecuteRequest(MdmServiceOperation`2 operation, TRequestType request, String caller) +159

    Microsoft.MasterDataServices.WebUI.ServiceAdapter.GetModelPrivileges(Guid principalId, PrincipalType principalType, SecurityResolutionType resolutionType) +421

    Microsoft.MasterDataServices.WebUI.ServiceAdapter.CacheModelPrivileges(Guid principalId, PrincipalType principalType, SecurityResolutionType resolutionType) +109

    Microsoft.MasterDataServices.WebUI.ServiceAdapter.GetModelPrivilegesFromCache(Guid principalId, PrincipalType principalType, SecurityResolutionType resolutionType) +149

    Microsoft.MasterDataServices.WebUI.Common.ModelTreeview.GetModelPermissions(SecurityResolutionType resolutionType) +291

    Microsoft.MasterDataServices.WebUI.Common.ModelTreeview.LoadTree(Node parentNode) +344

    Microsoft.MasterDataServices.WebUI.Common.ModelTreeview.LoadData() +442

    Microsoft.MasterDataServices.WebUI.Common.ModelTreeview.LoadData(String principalId, PrincipalType principalType, DisplayModeType displayMode, Int32 modelId) +158

    Microsoft.MasterDataServices.WebUI.Security.Common.Models.LoadTree() +280

    Microsoft.MasterDataServices.WebUI.Security.Common.Models.LoadData() +16

    Microsoft.MasterDataServices.WebUI.Security.Common.SecurityEditPageBase.OnLoad(EventArgs e) +222

    Microsoft.MasterDataServices.WebUI.Security.Common.Models.OnLoad(EventArgs e) +27

    System.Web.UI.Control.LoadRecursive() +68

    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785

    --------------------------------------------------------------------------------

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0

     

    The more you are prepared, the less you need it.

  • So, there is a bug in the MDS web processes.  This error happens when permission changes are made, and the MDS security does not do a complete job of clean up.  So, you get internal security references that return NULL, and that breaks the web app.

    This URL provides some details:

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/fe980530-ecd2-4c0e-a28e-1c841ef8c009/web-page-crashes-when-editing-model-permissions?forum=sqlmds

    Use this query to find any problem entries -  NULL's are not wanted, so any return records are a problem.

    select * from [mdm].[viw_SYSTEM_SECURITY_ROLE_ACCESSCONTROL] as ssra

    where ssra.Securable_MUID is null or ssra.Securable_Name is null

    You will want to backup the data, but just deleting the problem records has been effective:

    Example:

    So, if you have a problem with the AttributeGroup, which is Object_ID = 5 and Securible_ID = 1

    select * from mdm.tblSecurityRoleAccess where [Object_ID] =5 or Securable_ID = 1

    -- backup, and delete

    select * into dbo.tblSecurityRoleAccess_delete20200819 from mdm.tblSecurityRoleAccess

    where [Object_ID] =5 and Securable_ID = 1 ;

    go

    -- review

    select * from dbo.tblSecurityRoleAccess_delete20200819

    go

    -- then delete

    delete from mdm.tblSecurityRoleAccess where [Object_ID] =5 and Securable_ID = 1 ;

    go

    • This reply was modified 4 years, 4 months ago by  Andrew..Peterson. Reason: minor adj

    The more you are prepared, the less you need it.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply