ここ数日間、ストリーミング サービスのセットアップをぐるぐる回っていますが、タスクに戻るたびに、同じ 400 Bad Request の壁にぶつかり続けています。ここやウェブで多くの投稿を検索しましたが、これはよくある問題のようですが、状況はそれぞれ異なります. 以下は私のバインディング設定の現在の状態です - これは私が見落としている小さなものでなければならないと感じています.
WCF プロファイラーからの情報:
- サービスが呼び出されると、「構成評価コンテキストが見つかりません」という警告がスローされます。
- 次のエントリには、「一致するサービス タグが見つかりませんでした。デフォルトのエンドポイントが追加されました」と表示されます。
これにより、私が設定したものはすべてサービスに適用されていないと考えられ、したがって、ストリームが超過する ~64kb のデフォルトを使用しているため、Bad Request エラーがスローされます。
<!-- Services Config -->
<system.web>
<httpRuntime maxRequestLength="2097150" executionTimeout="7200"/>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="StreamingService" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed" >
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="StreamingService" behaviorConfiguration="StreamingServiceBehavior">
<endpoint address="http://localhost:50577/StreamingContent.svc"
binding="basicHttpBinding" bindingConfiguration="StreamingService"
contract="IStreamingContent" name="BasicHttpBinding_IStreamingContent" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<!-- Web Server Config -->
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IStreamingContent" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed"
useDefaultWebProxy="true">
<readerQuotas maxDepth="128" 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>
<client>
<endpoint address="http://localhost:50577/StreamingService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IStreamingService"
contract="StreamingService.IStreamingService" name="BasicHttpBinding_IStreamingService" />
</client>
新鮮な視点は確かに役立ちます。
編集:以下のアドバイスを受けた後、上記の構成を更新しましたが、プロファイラーで一致するタグが見つからないという同じ問題がまだ発生しています。今じゃないでしょ?
考え?