私がやろうとしているのは、単一の WCF サービスを HTTP スキームである開発環境で動作させることと、HTTPS スキームである本番環境で同じサービスを動作させることです。2 つの Https エンドポイント (接尾辞が「Https」のエンドポイント) を削除すると、開発環境で機能します。同様に、2 つの Http エンドポイントのみを削除すると、運用環境で機能します。可能であれば、web.config に 4 つのエンドポイントすべてを含めたいと考えています。
私のエンドポイントは以下に定義されています:
<endpoint address="/Web"
behaviorConfiguration="AjaxBehavior"
binding="wsHttpBinding"
bindingConfiguration="web"
name="Web"
contract="Service" />
<endpoint address="/Custom"
binding="customBinding"
bindingConfiguration="custom"
name="Custom"
contract="Service" />
<endpoint
address="/WebHttps"
behaviorConfiguration="AjaxBehavior"
binding="wsHttpBinding"
bindingConfiguration="webHttps"
name="WebHttps"
contract="Service" />
<endpoint address="/CustomHttps"
binding="customBinding"
bindingConfiguration="customHttps"
name="CustomHttps"
contract="Service" />
編集済み:質問を編集して、取得しているエラーとバインディング セクション (以下) を追加しています。質問の新しい長さで申し訳ありません。
エラーは次のとおりです。
さらに、本番サイトは「SSLが必要」に設定されています。それは変えられません。
バインディング構成は次のとおりです。
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="AjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="custom">
<textMessageEncoding>
<readerQuotas maxDepth="7000000" maxStringContentLength="7000000"
maxArrayLength="7000000" maxBytesPerRead="7000000"
maxNameTableCharCount="7000000" />
</textMessageEncoding>
<httpTransport maxBufferPoolSize="7000000" maxReceivedMessageSize="7000000"
maxBufferSize="7000000" />
</binding>
<binding name="customHttps">
<textMessageEncoding>
<readerQuotas maxDepth="7000000" maxStringContentLength="7000000"
maxArrayLength="7000000" maxBytesPerRead="7000000"
maxNameTableCharCount="7000000" />
</textMessageEncoding>
<httpsTransport maxBufferPoolSize="7000000" maxReceivedMessageSize="7000000"
maxBufferSize="7000000" />
</binding>
</customBinding>
<webHttpBinding>
<binding name="web" maxBufferPoolSize="70000000"
maxReceivedMessageSize="70000000">
<readerQuotas maxDepth="70000000" maxStringContentLength="70000000"
maxArrayLength="70000000" maxBytesPerRead="70000000"
maxNameTableCharCount="70000000" />
<security mode="None" />
</binding>
<binding name="webHttps" maxBufferPoolSize="70000000"
maxReceivedMessageSize="70000000">
<readerQuotas maxDepth="70000000" maxStringContentLength="70000000"
maxArrayLength="70000000" maxBytesPerRead="70000000"
maxNameTableCharCount="70000000" />
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
何か案は?