I have a WCF service hosted over Sharepoint. I have been trying to transfer large data in the form of byte arrays but I have been getting these 400-Bad Request errors. I have tried setting the message and buffer size limits to large values but nothing seems to have an effect. Here is my binding configuration for the client,
<basicHttpBinding>
<binding name="BasicHttpBinding_IOntolicaFASTService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="67108864" maxBufferPoolSize="524288" maxReceivedMessageSize="67108864" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLengt开发者_StackOverflow社区h="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
The problem mainly lies on the server side since there is no way I can set these parameters there while using [BasicHttpBindingServiceMetadataExchangeEndpointAttribute] for the WCF service in Sharepoint. So I would like to know if there is a way to configure them manually.
Any help here would be highly appreciated.
Fahad
I was able to solve the issue by creating a custom Service Host Factory based upon the Sharepoint default MultipleBaseAddressBasicHttpBindingServiceHostFactory. Worked perfectly!
精彩评论