He intentado varias veces que mi servicio WCF exponga MetaData. En lugar de ello, sigo manteniendo la excepción:WCF MetaData no funciona
El nombre de contrato 'IMetadataExchange' no se puede conocer en la lista de contratos ejecutados por el servicio SecurityBroker. Agregue un ServiceMetadataBehavior al archivo de configuración o al ServiceHost directamente para habilitar el soporte para este contrato.
... al navegar manualmente al servicio mediante IE.
(Estoy suponiendo que esto es la misma razón por la que mi aplicación cliente no es capaz de generar una referencia de servicio Los pasos del bebé y todas.)
Y sin embargo, mi web.config se ve bien:
<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>
Así que tengo mi IMetadataExchange contrato definido con mex bien, y enganchado, hasta donde puedo ver. ¿Me he perdido algo tonto?
Editar
Mi definición de servicio se muestra a continuación, si esto es útil:
<%@ ServiceHost Language="C#" Debug="true" Service="IWW.MIGTurbo2.WCF.Security.SecurityBroker" Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %>
excelente, que tiene! Muchas gracias. –