バッファとメッセージサイズを増やすためにカスタムバインディングを追加するようにweb.configを変更しましたが、サービス要素を明示的に作成すると、動作要素への参照が壊れたようです。
WCFテストクライアントを使用してVSからWebサービスを実行しようとした場合、またはサービスページに移動した場合、次のエラーが発生します。
Metadata publishing for this service is currently disabled.
私は自分のweb.configをこれに関するいくつかの異なるソースと比較しましたが、すべてが一致しているようです。問題が何なのかわかりません。
System.serviceModel要素は次のとおりです。
<system.serviceModel>
<services>
<service name="BIMIntegrationWS.BIMIntegrationService" behaviorConfiguration="metadataBehavior">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<endpoint address="http://localhost:1895/BIMIntegrationService.svc"
binding="customBinding" bindingConfiguration="customBinding0"
contract="BIMIntegrationWS.IBIMIntegrationService"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<!-- 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>
<bindings>
<customBinding>
<binding name="customBinding0">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize="262064"
maxBufferSize="262064"
maxBufferPoolSize="262064" />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
Webサービスページが要素を見つけていないようです。ターゲットのbehaviorConfigurationが存在しない、またはそのようなものが存在しないというエラーは発生しません。メタデータ発行が有効になっていないだけです。
どんな助けでも大歓迎です。
ありがとう。