I have the same kind of error when Web Services Configuration Wizard is run after removing, uninstalling, reinstalling Web Service and attempting to add company in order to clear the security metadata.
Loader Errors:
- Microsoft.Dynamics.Security.InvalidSecurityContextException: Microsoft.Dynamics.Security.NonExistentSecurityObjectException : The security object does not exist. Key = 25cc1a21-2cc4-4b13-a1c8-eea186fb688a
at Microsoft.Dynamics.Security.ValidationHelper.ValidateContext(SecurityContext context)
at Microsoft.Dynamics.Security.SecurityService.Get(SecurityContext context, Key key)
at Microsoft.Dynamics.Security.AzManOperationServiceImplementation.GetOperation(SecurityContext context, OperationKey operationKey)
at Microsoft.Dynamics.GP.GPSecurityMetadataSystemLoader.PerformActionForCustomSecurityOperation(Action action, String operationKey, Keyword keyword, String nameResXId, String descriptionResXId, String resXAssemblyName)
at Microsoft.Dynamics.GP.GPSecurityMetadataSystemLoader.PerformActionForStandardSecurityOperations(Action action, Type businessObjectType, Keyword keyword, Operation[] serviceOperations)
at Microsoft.Dynamics.GP.GPSecurityMetadataSystemLoader.PerformActionOnOperationsUpgradeVersion105ToVersion11(Action action)
at Microsoft.Dynamics.GP.GPSecurityMetadataSystemLoader.<GetActions>b__6()
at Microsoft.Dynamics.InstallData.Loader.Process(String[] args)
The company databases were upgraded from GP 10.0 on ADAM security on an older server to GP 2010 on a Windows 2008 server where we wish to use SQL security. Apparently the company databases themselves are not getting refreshed so the dependency on ADAM is not being removed. Therefore, I can successfully Remove security data using the Configuration Wizard, but I cannot add the companies. As a result, the Dynamics Security Console shows no applications to select and of course no companies. I have spent nearly a week reading all the posts on this issue and taking all the suggestions I have found.
The idea of leaving the old GP 10 server alone is to provide a failsafe for the delays caused by upgrade. My current test system is intended to be the new production system. All upgrades have gone successfully except Web Services, which is crucial to the client's business.
I cannot help but notice the questions regarding this error are officially "unanswered."
My question is "How do I safely remove the memory of ADAM security objects from the DYNAMICS database and (if needed) the company databases I have upgraded so I can use SQL security? Clearly reinstalling Web Services is insufficient.