IIS7でホストされているWCFサービスがあります(サービスとクライアントの構成はこの投稿の最後にあります)。私は、誰かがそれを攻撃して解決策を見つける方法についていくつかのアイデアを持っているかもしれないと期待していた奇妙なシナリオに遭遇しました。
このサービスは、1つのコントラクト'ProcessMessage'のみを公開します。そのコントラクトを使用して、期待されるパフォーマンスでサービスから同期メッセージを送受信できますが、そのコントラクトへの1つの特定の呼び出しは、65KBを超えるデータを返します。約1MB。最初に呼び出したときに、予想される最大受信サイズ超過エラーを受け取りました。そこで、maxReceivedMessageSizeを増やしました。この特定の呼び出しは、クライアントに戻るのに40分かかります。これは、タイムアウト設定をはるかに超えており、私が期待するものをはるかに超えています。サーバー側の処理時間はわずか2秒です。クライアント側で持ちこたえているようです。
また、ファイル内の他のクォータのいくつかを無駄に増やしてみました。
どんな考えでも大歓迎です。ありがとう。
サービス構成:
<system.serviceModel>
<services>
<service behaviorConfiguration="Lrs.Esf.Facade.Startup.FacadeBehavior"
name="Lrs.Esf.Facade.Startup.FacadeService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="default" contract="Lrs.Esf.Facade.Startup.IFacadeService">
<identity>
<servicePrincipalName value="lrsdomain/PensionDev" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="default">
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Lrs.Esf.Facade.Startup.FacadeBehavior">
<!-- 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>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IFacadeService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:1:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="52428800" maxReceivedMessageSize="6553600"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://esf2.facade.testpe.pg.local/FacadeWcf/FacadeService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFacadeService"
contract="FacadeServiceReference.IFacadeService" name="WSHttpBinding_IFacadeService">
<identity>
<servicePrincipalName value="lrsdomain/PensionDev" />
</identity>
</endpoint>
</client>