私のWCFサービスでMetaDataが公開されているのを何度も試みました。代わりに、私は例外を保ち続ける:WCF MetaDataが機能しない
契約名「IMetadataExchange」 がサービス SecurityBrokerによって実装 契約のリストに見つかりませんでした。 ServiceMetadataBehaviorを 構成ファイルまたは ServiceHostに直接追加して、この契約のサポート を有効にします。
... IEを使用してサービスを手動で参照しているとき。
(私はこれが私のクライアントアプリケーションは、サービス参照を生成することができない理由と同じ理由で想定していますベイビーステップとすべて。)
そして、まだ私のweb.configファイルは大丈夫になります
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<behaviors>
<endpointBehaviors>
<behavior name="webHttpEnablingBehaviour">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="webHttpEnablingBehaviour">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="IWW.MIGTurbo2.WCF.Security.SecurityBroker">
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
<endpoint address=""
binding="webHttpBinding"
bindingConfiguration="default"
contract="IWW.MIGTurbo2.WCF.Security.ISecurityBroker"
behaviorConfiguration="webHttpEnablingBehaviour">
</endpoint>
</service>
</services>
<client />
<bindings>
<webHttpBinding>
<binding name="default" />
</webHttpBinding>
</bindings>
</system.serviceModel>
だから私はIMetadataExchangeの契約はmexと定義されており、私が見るところでは繋がっています。私は何か迷ったことがありますか?
編集
これが有用である場合は私のサービスの定義は、以下に示します。
<%@ ServiceHost Language="C#" Debug="true" Service="IWW.MIGTurbo2.WCF.Security.SecurityBroker" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %>
優秀な、それはそれを持っています!どうもありがとう。 –