Identity Broker Forum
Welcome to the community forum for Identity Broker.
Browse the knowledge base, ask questions directly to the product group, or leverage the community to get answers. Leave ideas for new features and vote for the features or bug fixes you want most.
Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse cannot be cast
After updating the CRM SDK DLLs one out of six CRM connectors will not import with the error below. The failing connector is for a custom object type, however four of the successful connectors are also importing custom object types.
I have re-produced this in both the Dev and Test environments.
Change detection engine import all items for connector DAMS User started.",Normal
20170831,23:30:23,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector DAMS User failed with reason [A]Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse cannot be cast to [B]Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse. Type A originates from 'Microsoft.Crm.Sdk.Proxy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'LoadNeither' in a byte array. Type B originates from 'Microsoft.Crm.Sdk.Proxy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Program Files\UNIFY Solutions\Identity Broker\Services\Microsoft.Crm.Sdk.Proxy.dll'.. Duration: 00:00:01.3906576
Error details:
System.InvalidCastException: [A]Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse cannot be cast to [B]Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse. Type A originates from 'Microsoft.Crm.Sdk.Proxy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'LoadNeither' in a byte array. Type B originates from 'Microsoft.Crm.Sdk.Proxy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Program Files\UNIFY Solutions\Identity Broker\Services\Microsoft.Crm.Sdk.Proxy.dll'.
at Unify.Product.IdentityBroker.DynamicsCrmAgent.<ExecuteRead>d__41.MoveNext()
at Unify.Product.IdentityBroker.DynamicsCrmObjectChangeProcessor.<Transform>d__6.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Product.IdentityBroker.AuditReadingConnectorDecorator.GetAllEntities(IStoredValueCollection storedValues, CancellationToken cancellationToken)
at Unify.Product.IdentityBroker.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues, CancellationToken cancellationToken)
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass30_0.<Run>b__0()
at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal
Hi Carol
I have created a CRM and have been testing this issue, however I have not been able to reproduce. This indicates the cause is an environmental factor common to your test and dev environments.
If you are interested in finding a solution, I would start by deleting the contents of this folder: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root
Otherwise, as long as no other operations are being impacted, leaving the "Log Requests" option off would be enough to avoid the issue.
Adapter page errored on page reflection. System.Exception: Reflection failed because duplicate distinguished names were discovered.
Client is showing this error, about once every 30 seconds or so since 4pm this afternoon.
Can you please investigate and advise how to fix it?
I could find no matches in Voice for the text of this error.
Adapter
Adapter 676c7f08-45f0-495e-93db-73572f79d685 page errored on page reflection. Duration: 00:01:11.7818639. Error: System.Exception: Reflection failed because duplicate distinguished names were discovered. The duplicated values are:
CN=msg.myuser1@corp.client.com,OU=LicensedUsers,DC=IdentityBroker
CN=msg.myuser2@corp.client.com,OU=LicensedUsers,DC=IdentityBroker
at Unify.Product.IdentityBroker.Adapter.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterNotifierDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.ReflectAdapterOnChangeDueJob.<RunBase>b__0(IOperationalAdapter adapter).
Error details:
System.Exception: Reflection failed because duplicate distinguished names were discovered. The duplicated values are:
CN=msg.myuser1@corp.client.com,OU=LicensedUsers,DC=IdentityBroker
CN=msg.myuser2@corp.client.com,OU=LicensedUsers,DC=IdentityBroker
at Unify.Product.IdentityBroker.Adapter.ReflectChanges()
at Unify.Product.IdentityBroker.AdapterNotifierDecorator.ReflectChanges()
at Unify.Product.IdentityBroker.ReflectAdapterOnChangeDueJob.<RunBase>b__0(IOperationalAdapter adapter)
The maximum nametable character count quota (16384) has been exceeded while reading XML data
I am getting the following error when doing a "Test Connection" from IdB to CRM. The URI address resolves without cert errors in a browser. The CRM connector version is 5.2.0.1
Any idea what this means?
Error An error has occurred: Metadata contains a reference that cannot be resolved: 'https://crm.service.address/DAMS/XRMServices/2011/Organization.svc?wsdl=wsdl0'. Show Less
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Unify.Product.IdentityBroker.OrganizationServiceCommunicator.GetOrganizationService(IAddressCommunicatorInformation communicatorInformation)
at Unify.Product.IdentityBroker.OrganizationServiceCommunicator.<>c__DisplayClass1_0.<.ctor>b__0()
at Unify.Product.IdentityBroker.AddressCommunicatorBase`2.get_Service()
at Unify.Product.IdentityBroker.DynamicsCrmAgent.TestConnection()
at Unify.Product.IdentityBroker.AgentEngine.Test(Guid agentId)
at Unify.Product.IdentityBroker.AgentEngineAuditingDecorator.Test(Guid agentId)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassc.<GetExecutor>b__6(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()Inner Exception: An error has occurred: There is an error in XML document (1, 1127).
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Web.Services.Description.ServiceDescription.Read(XmlReader reader, Boolean validate)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.CreateMetadataSection(XmlReader reader, String sourceUrl)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)Inner Exception: An error has occurred: The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 1127.
at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
at System.Xml.XmlExceptionHelper.ThrowMaxNameTableCharCountExceeded(XmlDictionaryReader reader, Int32 maxNameTableCharCount)
at System.Xml.XmlBaseReader.QuotaNameTable.Add(Int32 charCount)
at System.Xml.XmlBaseReader.QuotaNameTable.Add(String value)
at System.Xml.Serialization.XmlSerializationReader.ToXmlQualifiedName(String value, Boolean decodeName)
at System.Web.Services.Description.ServiceDescriptionSerializationReader.Read117_Binding(Boolean isNullable, Boolean checkType)
at System.Web.Services.Description.ServiceDescriptionSerializationReader.Read124_ServiceDescription(Boolean isNullable, Boolean checkType)
at System.Web.Services.Description.ServiceDescriptionSerializationReader.Read125_definitions()
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
Issue was resolved with packaged CRM SDK replaced with version 8.2 and the above binding redirect configuration. Issues with the binding redirect configuration were caused by Voice lower-casing all XML element and attribute names. Refer to above image for correct casing.
IDB service occasionally consumes large amount of memory and CPU and becomes unresponsive
The customer's Unify.Service.Connect.exe occasionally (every few months or so) enters a state where it is consuming a large amount of CPU and memory and unresponsive.
In the most recent case, it was 3.2GB in size and using 100% of all 4 vCPUs on a machine with 12GB of RAM available.
IDB version is 4.1.5 RTM
HI Adam,
This issue went away when the customer upgraded their SQL server to use better performance disk, so you can resolve it.
I'm afraid there's no way to investigate any further, so I can't answer the connector question.
Cheers,
A.
Object reference not set to an instance of an object error during 'Test Connection'
I have a Custom connector which is throwing an error during Agent 'test connection' & when I try to connect in Connector. Connector is written by Richard Green. Richard believes that the error in Agent is being surfaced by code in IdB, not the custom connector.
I have turned the logging as high as possible, but it doesn't reveal enough information to assist in resolving the issue.
Is it possible to get more detail in this error?
20170830,05:19:07,UNIFY Identity Broker,AgentEngine,Warning,"The test of agent Contacts failed with message System.NullReferenceException: Object reference not set to an instance of an object. at Unify.Product.IdentityBroker.DatabaseAgent.TestConnection() at Unify.Product.IdentityBroker.AgentEngine.Test(Guid agentId).",Normal
Hi Matt,
Please apply the following patch Unify.IdentityBroker.Connector.Direct.dll and re-attempt the test operation. It should show you the stack-trace of the original error. Note that this won't resolve the issue, only assist with diagnosis, so feel free to remove it once the issue is resolved.
Improve entity search
Suggestions for entity search in IdB (in my personal order of priority):
1. A single place to set up search criteria which includes selecting the column, rather than the search icon at the top of each column
2. Add extra search criteria (search on two or more fields)
3. Selectable columns
Modify Connector schedules without disabling connector
It would be good to be able to modify IdB connector schedules without disabling the Connector. However as the main problem is the Adapter also gets disabled this may not be such a nuisance if that other suggestion is resolved.
Unify Idenity Broker v.5.0.4 RTM service stops after 3-5 mins with no error message
Hi Guys,
Just a quick question about Identity Broker 5.0.4.
After 5 mins, the service shutdown with no error. Do you have an idea about the cause?
There is nothing in the event viewer or in the log. I did some "import all" with no error.
Thanks in advance for your help.
This isn't a crash, something external is requesting that the service stops. Find the thing that's doing this and stop it from happening.
Schema provider checkboxes and UI cleanup
When a user clicks Request Schema, it's not obvious that the schema of the connected system is not shown. What is shown is a merge of the existing schema AND the schema of the connected system. This probably applies to all Connectors, but definitely on the Aurion one.
It's not clear that this is the behaviour.
When I hit the button "Request Shema", I expect the modal popup to contain the actual schema of the system, not a merge.
Then, when I hit "Continue with Schema", I expect the existing config to be merged. Having both options would be even better.
Option 1) Continue with New Schema
Option 2) Continue with Merged Schema
I've made this much more obvious (can see whether fields are new, intersect or existing), as well as update the button to show that the schemas are merged. Also added back in the checkboxes that went missing.
The key GroupOrg could not be found in the list of known profile types.
I'm seeing the following error for the 1st time on export to SharePoint in TEST environment.
GroupOrg is listed in the Sharepoint in DEV in this error. Can you please confirm that this just an environmental issue? Sharepoint in TEST is different to DEV?
System.Collections.Generic.KeyNotFoundException: The key GroupOrg could not be found in the list of known profile types. The known types are UserProfile_GUID, SID, ADGuid, AccountName, FirstName, SPS-PhoneticFirstName, LastName, SPS-PhoneticLastName, PreferredName, SPS-PhoneticDisplayName, WorkPhone, Department, Title, SPS-JobTitle, Manager, AboutMe, PersonalSpace, PictureURL, UserName, QuickLinks, WebSite, PublicSiteRedirect, SPS-DataSource, SPS-MemberOf, SPS-Dotted-line, SPS-Peers, SPS-Responsibility, SPS-SipAddress, SPS-MySiteUpgrade, SPS-DontSuggestList, SPS-ProxyAddresses, SPS-HireDate, SPS-DisplayOrder, SPS-ClaimID, SPS-ClaimProviderID, SPS-ClaimProviderType, SPS-LastColleagueAdded, SPS-OWAUrl, SPS-SavedAccountName, SPS-SavedSID, SPS-ResourceSID, SPS-ResourceAccountName, SPS-ObjectExists, SPS-MasterAccountName, SPS-DistinguishedName, SPS-SourceObjectDN, SPS-LastKeywordAdded, WorkEmail, CellPhone, Fax, HomePhone, Office, SPS-Location, SPS-TimeZone, Assistant, SPS-PastProjects, SPS-Skills, SPS-School, SPS-Birthday, SPS-StatusNotes, SPS-Interests, SPS-EmailOptin, ResponsibleSupervisorEntities, AnalysisEntities, RoleLevel, CostCentre, Company, StaffType, usrDivision, Team, Group, DaysAtOffice, RoleDescriptionUrl at Unify.Product.IdentityBroker.SharePoint2010Utilities.ConvertAttributeToValues(KeyValuePair`2 attribute, IDictionary`2 profileTypes, IValueAdapter`2 referenceValueToUserProfileNameAdapter, UserProfileNameToStringAdapter userProfileToNameAdapter) at Unify.Product.IdentityBroker.SharePoint2010UserProfileConnector.<ConvertConnectorEntityToPropertyData>b__23_2(<>f__AnonymousType3`2 <>h__TransparentIdentifier0) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Unify.Product.IdentityBroker.SharePoint2010UserProfileConnector.UpdateEntity(IConnectorEntity entity, ISharePoint2010UserProfileService communicatorChannel, ISaveEntityResults`2 results)
Hi Matt,
It would appear that your TEST instance of SharePoint is different to DEV. If the key is not present in the list inside the exception message, then the connector is not aware of the type.
Check the SharePoint schema for the TEST environment to double check the type exists.
Customer support service by UserEcho