Tôi có vấn đề với các lỗi sau: "Hạn ngạch kích thước tin nhắn tối đa cho tin nhắn đến (65536) đã bị vượt quá Để tăng hạn ngạch, sử dụng tài sản MaxReceivedMessageSize trên các yếu tố ràng buộc thích hợp."Tại sao Dịch vụ WCF của tôi không tải cấu hình Binding của tôi?
Vì vậy, tôi đã làm một số nghiên cứu và thấy rằng tôi cần thiết để tăng bộ đệm và kích thước thư, đây là WCF tập tin dịch vụ cấu hình của tôi:
<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>
Khi tôi chạy dịch vụ ở client WCF Test và nhìn vào cấu hình máy khách tạo ra tập tin đó không có ràng buộc của tôi:
<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>
Tôi bị mất là tại sao cấu hình ràng buộc của tôi là KHÔNG nhận được áp dụng !? WCF Test Client được thiết lập để luôn luôn tái tạo cấu hình là tốt. Tôi cũng đã cố gắng cập nhật các tài liệu tham khảo dịch vụ trong một ứng dụng kết thúc trước tiêu thụ, nhưng nó không không có được cấu hình ràng buộc cập nhật hoặc. Bất kỳ đề xuất sẽ được đánh giá rất cao. Cảm ơn!
Dường như với tôi như khách hàng của bạn đang nhận được sự ràng buộc của bạn ... –
Nhưng nó không có giá trị maxBufferPoolSize và maxReceivedMessageSize lớn hơn ... – MisterIsaak