Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/01/2012, 21:41
chcma
 
Fecha de Ingreso: junio-2003
Ubicación: Asturias
Mensajes: 2.429
Antigüedad: 20 años, 10 meses
Puntos: 7
WCF - Problema con el web.config - No detecta la configuracion del Behavior.

Buenas noches foreros.

He creado un WCF Service para ser hospedado vía IIS/WAS en .NET 4.0.

He cambiado el nombre de mi Interfaz, y el nombre del servicio.

Ejecuté para ver el metadata y se ve perfectamente, pero claro, esta como basicHttp, y como yo lo quería para wsHttp, cambié el archivo de configuración:

Código:
<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    
    <bindings>
      <wsHttpBinding>
        
        <binding name="wsHttpBindingDefault" >
          <security mode="TransportWithMessageCredential">
            <message clientCredentialType="UserName"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    
    <behaviors>      
      <serviceBehaviors>
        <behavior name="behaviorDefault">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <services>

      <service name="TicketOService" behaviorConfiguration="behaviorDefault">
        <endpoint binding="wsHttpBinding" bindingConfiguration="wsHttpBindingDefault"
                  contract="ITicketOService" />
      </service>
    </services>
    
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  
  
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>
El problema está en que cuando entro en mi servicio (http://localhost:7345/TicketOService.svc), me muestra que el metadata está desactivado, cuando estoy indicando claramente en el web.config que quiero publicarlo.

¿Sabén que está pasando?

En fin, espero puedan ayudarme, y desde ya.. les estoy muy agradecido por su tiempo.

Saludos.
__________________
Charlie.