WCF Web サービスで 2 番目のエンドポイントを作成しようとしています。ブラウザーにドメイン URL を入力することで、新しいエンドポイントの「ハッピー ページ」を表示できるので、IIS がユーザー アカウントを使用して適切にサービスを検索できることがわかります。
ただし、サービスを呼び出す Web ページを実行しようとすると、以下のエラーが発生します。
The binding at system.serviceModel/bindings/wsHttpBinding does not have a configured
binding named 'WSHttpBinding_IMonetToDss'. This is an invalid value for
bindingConfiguration. (D:\webcontent\Monet\web.config line 178).
構成ファイルのこのセクションは、サービス参照を作成するときに Visual Studio によって自動生成されるため、bindingConfiguration
値はWSHttpBinding_IMonetToDss
.. であってはなりません。
以下は、web.config から取得された両方のエンドポイントです。最初のエンドポイント/OKeeffe/OKeeffe.svc
は正常に機能しています。の 2 番目のエンドポイント/OKeeffe/MonetToDss.svc
は、問題を抱えています。
<client>
<endpoint address="http://insidesoap.dev.symetra.com/Escher/EscherService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IEscherService"
contract="Escher.IEscherService" name="WSHttpBinding_IEscherService" />
<endpoint address="http://insideapps.dev.symetra.com/OKeeffe/OKeeffe.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAgentPayments"
contract="AgentPayments.IAgentPayments" name="WSHttpBinding_IAgentPayments">
<identity>
<userPrincipalName value="s.AgentData.dev" />
</identity>
</endpoint>
<endpoint address="http://insideapps.dev.symetra.com/OKeeffe/MonetToDss.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMonetToDss"
contract="MonetToDss.IMonetToDss" name="WSHttpBinding_IMonetToDss">
<identity>
<userPrincipalName value="s.AgentData.dev" />
</identity>
</endpoint>
</client>
編集
system.serviceModel
Web サービス構成ファイルのセクションは次のとおりです。
<system.serviceModel>
<services>
<service name="OKeeffeDataService.MonetToDss"
behaviorConfiguration="MonetToDssBehaviors" >
<endpoint address=""
binding="wsHttpBinding"
contract="OKeeffeDataService.IMonetToDss" />
</service>
<service name="OKeeffeDataService.AgentPayments"
behaviorConfiguration="OKeeffeBehavior" >
<endpoint address=""
binding="wsHttpBinding"
contract="OKeeffeDataService.IAgentPayments" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="OKeeffeBehavior">
<!-- 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>
<behavior name="MonetToDssBehaviors" >
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>