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.

0
Not a bug

Dynamics CRM Metadata contains a reference that cannot be resolved SSL Problem

Using the Broker Microsoft Dynamics CRM v5.2.0.1, Infrastructure are seeing some intermittent errors. The error shows in MIM and when checking the IdB logs the content of the error is the same as what shows in IdB. It's not that big a problem. It only occurs occurs on export and the pending export that fails remains a pending export and is processed ten minutes later and the error isn't rethrown on the second export. It seems to be some type of network connection problem but there aren't a lot of settings to configure it in the CRM Agent. Just the address and account and they're both correct. The full error is pasted below.

System.InvalidOperationException: Metadata contains a reference that cannot be resolved: 'https://dynamicscrm.internal.dotars.gov.au/DAMS//XRMServices/2011/Organization.svc?wsdl&sdkversion=8.2'. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
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, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
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.GetAttributeMetadata(String objectName, EntityFilters schemaRetrieveEntityFilters)
at Unify.Product.IdentityBroker.DynamicsCrmAgent.RetrieveSpecialFieldTypes(String objectName)
at Unify.Product.IdentityBroker.DynamicsCrmObjectConnector.GetSpecialFieldTypesInformation(IDynamicsCrmAgent`2 agent)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Unify.Product.IdentityBroker.DynamicsCrmObjectConnector.UpdateEntities(IEnumerable`1 entities, IEnumerable`1 originalEntities, ISaveEntityResults`2 results)
at Unify.Product.IdentityBroker.AuditUpdatingConnectorDecorator.UpdateEntities(IEnumerable`1 entities, IEnumerable`1 originalEntities, ISaveEntityResults`2 results)
at Unify.Product.IdentityBroker.EventNotifierUpdatingConnectorDecorator.UpdateEntities(IEnumerable`1 entities, IEnumerable`1 originalEntities, ISaveEntityResults`2 results)

Any clues on the resolution of this intermittent issue? We haven't done diagnostic logging because it's in production and the error is intermittent so making huge logs is undesirable. I googled a bit and it looks like there are lines of code to set the TLS version to 1.2 which has resolved the same error in different contexts for other people. But you guys don't hardcode the authentication with web services right? So maybe the bindings should be updated? Still it doesn't make much sense that it fails sometimes and works sometimes. Makes me think the service is the problem rather than broker.

Answer

Closing due to no update.

0
Answered

Microsoft.Crm.Sdk.Messages.QueryExpressionToFetchXmlResponse cannot be cast

Carol Wapshere 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 7 years ago 3

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
Answer
anonymous 7 years ago

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.

0
Answered

The maximum nametable character count quota (16384) has been exceeded while reading XML data

Carol Wapshere 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 7 years ago 14

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)

Answer
anonymous 7 years ago

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.

0
Answered

Identity Broker CRM Connector Exported Changes are Not Appearing in CRM

Aneesh Varghese 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by Richard Green 5 years ago 5

Previous Version: Microsoft Dynamics CRM Connector v4.1.1.1

Upgraded Version: Microsoft Dynamics CRM Connector v5.1.0.1

Observing a strange behaviour after the Connector upgrade. Exports are successful from IdB and FIM point of view but the changes are not reflected in CRM.

The above mentioned behaviour is happening only for new users/records or if the attribute is "Null" or blank in CRM. Changes are appearing correctly if the attribute is already populated with something (existing contact/record).

Please advise what details you need to troubleshoot this issue.

I already performed the following:

  • Checked the IdB logs but couldn't find any errors
  • Checked with the CRM team
  • Captured the TCP traffic but found the SOAP message is pretty much encrypted
Answer
anonymous 7 years ago

Hi Aneesh,

Here is a patch that should hopefully resolve this issue. Could you backup (to a different location) and replace the Unify.IdentityBroker.Communicator.DynamicsCRM.dll that is currently in the Identity Broker/Services directory with the patched version below.

Unify.IdentityBroker.Communicator.DynamicsCRM.dll

0
Not a bug

Export Returns Entity Schema Validation Error

Aneesh Varghese 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 7 years ago 4

Image 4165

Previous Version: Microsoft Dynamics CRM Connector 4.1.1.1

Upgraded Version: Microsoft Dynamics CRM Connector 5.1.0.0

Management Agent Export Error:

System.Exception: A -2147204326 fault occurred with message A validation error occurred.  The value of 'address3_addresstypecode' on record of type 'contact' is outside the valid range.. See the server logs for details.

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.TargetAttributeValidationPlugin]
[fc743e7d-fbea-4695-bdb9-7d78334c8474: TargetAttributeValidationPlugin]


   at Unify.Product.IdentityBroker.DynamicsCrmAgent.GetException(OrganizationServiceFault fault)

 

IdB Stack Trace

Request to retrieve logs.
Request to retrieve logs failed with message Collection was modified; enumeration operation may not execute.. Date: 31/05/2017. Skip: 0. Take: 10. Search: address3_addresstypecode. Duration: 00:00:03.7129126
Error details:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Linq.Enumerable.<SkipIterator>d__4d`1.MoveNext()
at System.Linq.Enumerable.<TakeIterator>d__3a`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Unify.Framework.Logging.LoggingEngineNotifierDecorator.<>c__DisplayClass6_0.<ReadLogSearch>b__0()
at Unify.Framework.Notification.NotifierDecoratorBase.Notify[TResult](ITaskNotificationFactory notificationFactory, Func`1 function)
at Unify.Framework.Logging.LoggingEngineNotifierDecorator.ReadLogSearch(DateTime date, String search, Int32 skip, Int32 take)
at Unify.Product.IdentityBroker.IdentityServiceCollector.ReadLogSearchSkipTake(DateTime date, String search, Int32 skip, Int32 take)
at SyncInvokeReadLogSearchSkipTake(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)


Answer
anonymous 7 years ago

Confirmed this is a CRM/client specific issue and can be safely ignored. 

0
Answered

The new ECMA 2.0 IdB MA export run profile returns "cd-error" after the IdB/CRM Connector upgrade (from v4.x to v5.1.x)

Aneesh Varghese 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 7 years ago 11

The new ECMA 2.0 IdB Mangement Agent Export Run Profile Returns "cd-error" after the IdB/CRM Connector Upgrade (from v4.x to v5.1.x)

Previous Version: Microsoft Dynamics CRM Connector 4.1.1.1

Upgraded Version: Microsoft Dynamics CRM Connector 5.1.0.0


IdB error logs

.Net SqlClient Data Provider:

System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       .....

Error Number:1205,State:48,Class:13

Image 4161

Answer
anonymous 7 years ago

Summary from Aneesh (private comment):

To recap, this issue is caused by imports and exports to CRM (though via different connectors) running at the same time and timing out. Curtis, you suggested running two operations in isolation. I reviewed the CRM Management Agents (MA) and I can see that this MA (Dynamics CRM – Export) is only used for exporting change back to the CRM and there is a separate MA called “Dynamics CRM – Users” is created to import changes from CRM. I am not sure why two separate management agents created instead of just one for both import and export operations. I will check with the client. If no real reason, I will recommend merging both MA’s into just one MA to avoid any concurrency issues.
0
Answered

Filter on NotNull

Carol Wapshere 8 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 8 years ago 6

I want to set the connector filter to exclude contacts that don't have an email adress. I have checked this page: https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.query.conditionoperator.aspx and there is a filterType "NotNull" however IdB won't let me save "emailaddress1 NotNull". I think it is looking for a value on the other side of the filter, but for this I don't need one.


I tried setting setting "emailaddress1 NotNull Null" and also tried setting fieldValue="" in the Connector XML but for both I get this error in running the Import: "Condition operation 'NotNull' requires that no values are set".


Also tried "emailaddress1 Contains @" but I guess emailaddress1 isn't full-text indexed as I got the SQL error mentioned in the article.

And "emailaddress1 NotEqual Null" was accepted, and imported, but imported everything, irrespective of emailaddress1 having a value or not.

Answer
anonymous 8 years ago

The filter currently assumes that there is a field, type and value, so I'll have a look at what can be done here.

0
Fixed

Identity Broker for CRM initial connector configuration issue

Ryan Crossingham 11 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 8 years ago 17

Currently can not read the CRM schema via CRM connector.

When attempting to pull down the CRM schema i receive the following error: Unable to load the embedded resource 'Unify.Service.Embedded.Microsoft.Xrm.Sdk.dll' from Unify.Service.Connect, Version=4.0.0.0, Culture=neutral, PublicKeyToken=84b9288cb2633de4:

HALP!



CRM1.png
CRM2.png
CRM3.png
CRMSchemaContact.xlsx
microsoft.crm.sdk.proxy.dll
microsoft.xrm.sdk.dll
0
Completed

Identity Broker for Dynamics CRM - Base64 Annotation encoded picture too large for Sync Service

Ryan Crossingham 11 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 8 years ago 8

Once annotation connector is added to the adapter Imports fail with the following trace.

Log Name:      Application
Source:        FIMSynchronizationService
Date:          24/06/2013 4:38:45 p.m.
Event ID:      6801
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      PSVMFIMDEV01.ps.ad.parliament.govt.nz
Description:
The extensible extension returned an unsupported error.
 The stack trace is:
 
 "System.Exception: Error encountered attempting import: System.IO.IOException: An exception has been thrown when reading the stream. ---> System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (204003200) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (204003200) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.MaxMessageSizeStream.PrepareRead(Int32 bytesToRead)
   at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at System.Xml.EncodingStreamWrapper.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Xml.XmlBufferReader.TryEnsureBytes(Int32 count)
   at System.Xml.XmlBufferReader.GetBuffer(Int32 count, Int32& offset, Int32& offsetMax)
   at System.Xml.XmlUTF8TextReader.ReadText()
   at System.Xml.XmlUTF8TextReader.Read()
   at System.Xml.XmlBaseReader.MoveToContent()
   at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Unify.Framework.IO.StreamExtensions.CopyTo(Stream source, Stream destination)
   at Unify.Product.IdentityBroker.IdentityBrokerManagementAgentProxy.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData) 

   at Unify.Product.IdentityBroker.IdentityBrokerManagementAgentProxy.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData)
Forefront Identity Manager 4.1.3441.0"
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="FIMSynchronizationService" />
    <EventID Qualifiers="49152">6801</EventID>
    <Level>2</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2013-06-24T04:38:45.000000000Z" />
    <EventRecordID>448936</EventRecordID>
    <Channel>Application</Channel>
    <Computer>PSVMFIMDEV01.ps.ad.parliament.govt.nz</Computer>
    <Security />
  </System>
  <EventData>
    <Data>System.Exception: Error encountered attempting import: System.IO.IOException: An exception has been thrown when reading the stream. ---&gt; System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (204003200) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---&gt; System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (204003200) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.MaxMessageSizeStream.PrepareRead(Int32 bytesToRead)
   at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at System.Xml.EncodingStreamWrapper.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Xml.XmlBufferReader.TryEnsureBytes(Int32 count)
   at System.Xml.XmlBufferReader.GetBuffer(Int32 count, Int32&amp; offset, Int32&amp; offsetMax)
   at System.Xml.XmlUTF8TextReader.ReadText()
   at System.Xml.XmlUTF8TextReader.Read()
   at System.Xml.XmlBaseReader.MoveToContent()
   at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Unify.Framework.IO.StreamExtensions.CopyTo(Stream source, Stream destination)
   at Unify.Product.IdentityBroker.IdentityBrokerManagementAgentProxy.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String&amp; customData) 

   at Unify.Product.IdentityBroker.IdentityBrokerManagementAgentProxy.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String&amp; customData)
Forefront Identity Manager 4.1.3441.0</Data>
  </EventData>
</Event>

Keep in mind these base64 strings are HUGE..
How can when up this MAX or avoid this?

0
Fixed

LINQ error and entity doesn't contain Id attribute error

James Booth 11 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 8 years ago 9

Exporting to CRM, this is the result:

System.Exception: Error occurred when attempting to save entity with distinguished name
 
CN=12700
 
Error:
 
The method IEntityBase`.GetValue() is not supported in this context.  Use IEntityBase`.GetValueOrDefault() instead.
 
The method is not supported as use of this method in a LINQ statement against an implementation will result in the same exception type being thrown if the key value is not present in an instance of the entity.
   at Unify.Product.IdentityBroker.Repository.EntityExpressionQueryVisitor`4.VisitMethodCall(MethodCallExpression m)
   at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
   at Unify.Framework.ExpressionExpressionVisitorBase.&lt;VisitExpressionList&gt;b__d(Expression originalExpression)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Unify.Framework.ExpressionExpressionVisitorBase.VisitExpressionList(ReadOnlyCollection`1 original)
   at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.VisitMethodCall(MethodCallExpression m)
   at Unify.Product.IdentityBroker.Repository.EntityExpressionQueryVisitor`4.VisitMethodCall(MethodCallExpression m)
   at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
   at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.VisitLambda(LambdaExpression lambda)
   at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
   at Unify.Framework.ExpressionExpressionVisitorBase.VisitUnary(UnaryExpression u)
   at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
   at Unify.Framework.ExpressionExpressionVisitorBase.&lt;VisitExpressionList&gt;b__d(Expression originalExpression)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
  at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Unify.Framework.ExpressionExpressionVisitorBase.VisitExpressionList(ReadOnlyCollection`1 original)
   at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.VisitMethodCall(MethodCallExpression m)
   at Unify.Product.IdentityBroker.Repository.EntityExpressionQueryVisitor`4.VisitMethodCall(MethodCallExpression m)
   at Unify.Framework.ExpressionVisitorBase`11.Visit(Expression exp)
   at Unify.Framework.Data.LinqContextConversionExpressionVisitorBase`5.ConvertExpression(Expression partitionExpression)
   at Unify.Framework.Data.LinqQueryConversionProvider`5.GetOrderedQuery(Expression businessExpression, IQueryable`1 sourceQueryable, TContext sourceContext)
   at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Unify.Product.IdentityBroker.DynamicsCrmObjectConnector.UpdateEntities(IEnumerable`1 entities)
   at Unify.Product.IdentityBroker.EventNotifierUpdatingConnectorDecorator.UpdateEntities(IEnumerable`1 entities)
   at Unify.Product.IdentityBroker.Adapter.UpdateEntities(IEnumerable`1 entities, Boolean reflect)
   at Unify.Product.IdentityBroker.AdapterNotifierDecoratorBase`1.UpdateEntity(IAdapterEntity entityToSave)
   at Unify.Product.IdentityBroker.LDIFAdapterBase.ExportChanges(ExportedLDIFForAdapter exportedLdifForAdapter)
   at SyncInvokeExportChanges(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
   at Unify.Product.IdentityBroker.IdentityBrokerManagementAgentProxy.ExportEntry(ModificationType modificationType, String[] changedAttributes, CSEntry csentry)

Unify.Product.IdentityBroker.ConnectorEnginePlugInKey.extensibility.config.xml