2015-07-23 3 views
0

J'utilise un client WCF et appelle une méthode GetEmployeeId. Dans la méthode GetEmployeeId, j'ai une déclaration de retour.Le quota maximal de taille de message pour les messages entrants (65536) a été dépassé même après le passage à 2147483647

return employeeid; 

Lorsque j'ajoute un point d'arrêt sur employeeid - il a 4984 id.

Une fois que je clique sur continuer, je reçois l'erreur suivante:

Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.

Inner Exception:
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

Dans le client et le service, je me sers:

<bindings> 
    <basicHttpBinding > 
     <binding name="MybasicHttpBinding" 
      maxBufferPoolSize="2147483647" maxBufferSize="2147483647" 
      maxReceivedMessageSize="2147483647"> 
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" 
         maxArrayLength="2147483647" /> 
     </binding> 
    </basicHttpBinding> 
</bindings> 

et l'adresse de point de terminaison:

<endpoint 
    address="http://localhost/EmployeeService/Service.svc" 
    binding="basicHttpBinding" 
    bindingConfiguration="MybasicHttpBinding" 
    contract="Employee.Contract.IEmployee" > 

Répondre

0

Le nombre d'ID étant inférieur au quota de taille maximale est facilement possible. Si vous avez, par exemple, une pièce d'identité très basique qui ressemble

alors même si elle est « 1 » dossier, il prend 26 octets de « taille ».