I am getting this error while passing byte[] to WCF. Can someone plz solve this error??
Configuration at Service(web.config)
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="NewBinding0" maxBufferSize="2097151" maxBufferPoolSize="2097151"
maxReceivedMessageSize="2097151" messageEncoding="Mtom"
transferMode="Streamed">
<readerQuotas maxDepth="2097151" maxStringContentLength="2097151"
maxArrayLength="2097151" maxBytesPerRead="2097151" maxNameTableCharCount="2097151" />
</binding>
</basicHttpBinding>
<mexHttpBinding>
<binding name="higherMessageSize_MEX" />
</mexHttpBinding>
</bindings>
<client>
<endpoint binding="basicHttpBinding" bindingConfiguration="NewBinding0"
contract="LService.IService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="higherMessageSize_MEX"
contract="IMetadataExchange" />
</client>
<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="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Configuration at WPF application (app.config)
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097151" maxBufferPoolSize="2097151" maxReceivedMessageSize="2097151"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Streamed"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2097151" maxStringContentLength="2097151"
maxArrayLength="2097151" maxBytesPerRead="2097151" maxNameTableCharCount="2097151" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:5980/LService/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="LService.IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>