Windows Phone アプリケーションから大きなバイト配列をwcf サービスに渡そうとしています。大きなバイト配列を渡すためにあらゆる方法を試しましたが、渡すことができませんでした。
これが私のweb.configです
<system.serviceModel>
<bindings>
<basicHttpBinding>
<!--<binding maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" receiveTimeout="00:10:00" closeTimeout="00:10:00">
<security mode="None" />
</binding>-->
<binding closeTimeout="01:30:00"
openTimeout="01:30:00" receiveTimeout="01:30:00" sendTimeout="01:30:00" transferMode="Streamed"
maxBufferSize="2147483646" maxBufferPoolSize="2147483646" maxReceivedMessageSize="4294967295">
<readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646" maxArrayLength="2147483646"
maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="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>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
受信メッセージの最大サイズを使用しました2147483646
。今、私は私の
ServiceReferences.ClientConfig
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://xxx.xx.x.xxx/WebService/Service1.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
contract="MyService.IService1" name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
</configuration>
次のパラメーターを wcf サービスメソッドに渡しています
Service1.svc.cs
public string GetDataUsingDataContract(byte[] fileByte,string fileName,string folderName)
{
}
私はたくさん検索しましたが、同様の例を1つ見つけました最大配列長クォータ
しかし、windows phone 8 はサポートしていないと聞きましたnetTcpBinding
。2GBのファイルを wcf サービスに渡すことができると読みました。最大バイト配列を渡すにはどうすればよいですか? 私はこの問題に悩まされています。誰かがこれを解決するのを手伝ってくれますか?