ho il problema con il seguente errore: "La quota dimensione massima dei messaggi per i messaggi in arrivo (65536) è stato superato di aumentare la quota, utilizzare la proprietà MaxReceivedMessageSize sull'elemento di rilegatura appropriato."Perché il servizio WCF non sta caricando la mia configurazione di binding?
Così ho fatto qualche ricerca e ha scoperto che avevo bisogno di aumentare il buffer e dimensione del messaggio, ecco la mia WCF service file di configurazione:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="default" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"/>
</wsHttpBinding>
</bindings>
<services>
<service name="WCF.Service.Service">
<endpoint address="ws" name="ws" bindingConfiguration="default" binding="wsHttpBinding" contract="WCF.Service.Contracts.IService" />
<endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Quando eseguo il servizio nel client di prova WCF e guardo il config client generato archiviarlo non ha ho il mio impegno:
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="ws" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:37444/Service.svc/ws" binding="wsHttpBinding"
bindingConfiguration="ws" contract="IService" name="ws">
<identity>
<userPrincipalName value="[email protected]" />
</identity>
</endpoint>
</client>
</system.serviceModel>
Mi sono perso come il motivo per cui la mia configurazione è vincolante NON sempre applicato !? Il client di test WCF è impostato per rigenerare sempre anche la configurazione. Ho anche provato ad aggiornare il riferimento del servizio in un'applicazione front-end che consuma, ma lo è non ottenere la configurazione di binding aggiornata. Ogni suggerimento sarà molto apprezzato. Grazie!
Mi sembra che il tuo cliente riceva l'associazione ... –
Ma non ha i miei valori maxBufferPoolSize e maxReceivedMessageSize più grandi ... – MisterIsaak