!--- この投稿が他の投稿と重複している場合は申し訳ありませんが、私のプロジェクトの問題は私のアーキテクチャに起因しているようです。そのため、一般的な助けが必要です。---!
Silverlight 5 クライアント側に接続された WCF サービスと、データベースに対して CRUD 要求を行う C# クラス ライブラリを構成しようとしています。サービスは膨大な量のデータを渡す必要があります。たとえば、私のサービス クラスにはpublic IList< RainRecord> GetAllRain()メソッドがあり、データベース内の何十万ものレコードを取得できますが、いつかそれ以上になるでしょう。したがって、これらすべてのレコードを小さなバッチで取得できると考えました (これはかなり良いアプローチだと思います)。
これが私のweb.configファイルです:
<?xml version="1.0" encoding="utf-8"?>
<!--This file contains the web configuration used by the WCF service. -->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" maxBatchGeneratedFileSize="2147483647" maxBatchSize="2147483647" />
<httpRuntime maxRequestLength="2147483647" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
<serviceActivations>
<add service="PoseidonServiceNamespace.PoseidonService" relativeAddress="~/PoseidonService.svc"/>
</serviceActivations>
</serviceHostingEnvironment>
<bindings>
<basicHttpBinding>
<binding closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="PoseidonServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="PoseidonServiceBehavior"
name="PoseidonServiceNamespace.PoseidonService">
<endpoint address="http://localhost:49455/PoseidonService.svc"
binding="basicHttpBinding"
contract="PoseidonServiceNamespace.IPoseidonService"/>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
このファイルで行うべき変更 (およびその理由) と、パブリック IList GetAllRain() メソッドをサービスに実装する方法を教えてください。
本当にありがとう、私はしばらくこれに頭をぶつけていました