0
Answered

System.ServiceModel.QuotaExceededException:The maximum message size quota for incoming messages (204003200) has been exceeded

André van der Westhuizen 9 years ago in UNIFYBroker/Microsoft Identity Manager updated by anonymous 9 years ago 4

Mail from Nirmal:

Hi Andre,

Here is the error I found in event logs of FIM Sync server.

IDB logs are fine and have no errors or warnings since 4 July. Error on 4 July was related to internet issues experienced by whole company.

Regards

Log Name:      Application
Source:        FIMSynchronizationService
Date:          5/07/2015 4:42:46 AM
Event ID:      6801
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:    
 NIOSHSFIM01V.news.newslimited.local
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.ServiceModel.Channels.DelegatingStream.Read(Byte[]
buffer, Int32 offset, Int32 count)

   at
System.ServiceModel.Channels.DetectEofStream.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.3613.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="2015-07-04T18:42:46.000000000Z" />

   
<EventRecordID>794791</EventRecordID>

    <Channel>Application</Channel>

   
<Computer>NIOSHSFIM01V.news.newslimited.local</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.ServiceModel.Channels.DelegatingStream.Read(Byte[] buffer, Int32 offset,
Int32 count)

   at
System.ServiceModel.Channels.DetectEofStream.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.3613.0</Data>

  </EventData>

</Event>

 
Nirmal Patel

Senior Systems Engineer Wintel

Mail sent to Nirmal:

Hi Nirmal,

I have raised an issue https://unifysolutions.jira.com/browse/NEWSLTD-61 for you, the reason for the issue is as follow:

This issue can occur if the maxReceivedMessageSize of the "MetadataExchangeHttpBinding_ILDIFAdapter" is not defined, or is not large enough to support the write-requirements of the particular Identity Broker import. After a large number of entities, the import will surpass the default/set maxReceivedMessageSize for the endpoint configuration. To remedy this issue, update the setting to reflect the requirements of the affected system by updating the binding properties on the Identity Broker service and FIM configuration.

Herewith the steps to fix the issue:

  1. Log onto the FIMSynchronization Server;
  2. Stop the FIM Event Broker Schedules;
  3. Navigate to “C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin”
  4. Make a backup of “miiserver.exe.config”;
  5. Edit the file “miiserver.exe.config”:
    1. Find “maxReceivedMessageSize="204003200"” within bindings \ basicHttpBinding:
          <bindings>
            <basicHttpBinding>
              <binding name="MetadataExchangeHttpBinding_ILDIFAdapter"
              maxBufferSize="65536" transferMode="Streamed"
              maxReceivedMessageSize="204003200" receiveTimeout="10:00:00"
              closeTimeout="10:00:00" openTimeout="10:00:00"
              sendTimeout="10:00:00">
             <!-- Uncomment the following lines if you wish to use SSL. The service config must also be set to use SSL! -->
             <!--
              <security mode="Transport">
                <transport clientCredentialType="None" proxyCredentialType="None" realm="">
                   <extendedProtectionPolicy policyEnforcement="Never" />
                </transport>
              </security>
              -->
            </binding>
            </basicHttpBinding>
          </bindings>
      
    2. Change the “maxReceivedMessageSize” to ="816012800”:
          <bindings>
            <basicHttpBinding>
              <binding name="MetadataExchangeHttpBinding_ILDIFAdapter" 
              maxBufferSize="65536" transferMode="Streamed"
              maxReceivedMessageSize="816012800" receiveTimeout="10:00:00"
              closeTimeout="10:00:00" openTimeout="10:00:00"
              sendTimeout="10:00:00">
             <!-- Uncomment the following lines if you wish to use SSL. The service config must also be set to use SSL! -->
             <!--
              <security mode="Transport">
                <transport clientCredentialType="None" proxyCredentialType="None" realm="">
                  <extendedProtectionPolicy policyEnforcement="Never" />
                </transport>
              </security>
              -->
            </binding>
            </basicHttpBinding>
          </bindings>
      
  1. Safe the file and restart the FIMSynchronizationService service;
  2. Run a Full Import on the Workday Employees Management Agent; and
  3. Confirm if the issue has been resolved.

Kind Regards,
Andre van der Westhuizen

Resolution sent to Nirmal

Have spoken to Nirmal and the change was successful and the issue can be closed.