BUGS AND FEATURES - sorokinDev/WPF_CSharp_Issues_Features GitHub Wiki

API query throws:

System.ServiceModel.QuotaExceededException: Превышена квота максимального размера сообщения для входящих сообщений (65536). Для увеличения квоты используйте свойство MaxReceivedMessageSize соответствующего элемента привязки.

Solution

    <system.serviceModel>
          <bindings>
            <basicHttpBinding>
              <binding name="https_AS2CSearch" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
                <security mode="Transport" />
              </binding>
            </basicHttpBinding>
          </bindings>
        <client>
            <endpoint address="https://allautoparts.ru/WEBService/SearchService.svc"
                binding="basicHttpBinding" bindingConfiguration="https_AS2CSearch"
                contract="Models.StelsAPI.IAS2CSearch" name="https_AS2CSearch" />
        </client>
    </system.serviceModel>

Issue with untrusted ssl certificate

Solution

ServicePointManager.ServerCertificateValidationCallback +=
                (sender, cert, chain, sslPolicyErrors) => true;
⚠️ **GitHub.com Fallback** ⚠️