2009-07-28 23 views
5

Tengo un servicio WCF desplegado detrás del equilibrador de carga, cuando trato de alcanzarlo con SOAP funciona muy bien, pero cuando trato de alcanzarlo a través de la URL REST aparece el error mencionado a continuación .WCF REST: WebHost no pudo procesar la solicitud

Esta es la URL REST trato de alcanzarla con https: // devreporting.dev.sample.com/ReportingManagement.svc/getAddtionsByCategory ..

El equilibrador de carga VIP es https: // devreporting.dev .sample.com y solo hay un servidor detrás del firewall que es dev01

Creo que esto es un problema con los encabezados del host, pero no estoy seguro de cómo solucionarlo. Cualquier idea sería muy apreciada.

Message: WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/12646224 
Exception: 

System.Web.HttpException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
     This is often caused by an incorrect address URI. 
     Ensure that the address to which the message is sent matches an address on which a service is listening. ---> 
    System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://dev01.dev.sample.com:17005/ReportingManagement.svc/reporting/getAddtionsByCategory'. 
      This is often caused by an incorrect address URI. 
      Ensure that the address to which the message is sent matches an address on which a service is listening. 
    at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)  
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() 
    --- End of inner exception stack trace ---  
    at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) 
    Process Name: w3wp Process ID: 4760 
+0

se puede explicar por favor lo que es la diferencia entre el SOAPURI y descansar URI, ¿quieres decir que uno está en Http y el otro está en Https? – hussian

Respuesta

11

Uf ... que me estaba perdiendo la configuración de seguridad en mi sección, cuando he añadido, las cosas funcionaba como encanto

<webHttpBinding> 
    <binding name="CommerceRESTBinding"> 
     <security mode="Transport"> 
       <transport clientCredentialType = "None" proxyCredentialType="None"/> 
     </security> 

</binding> 
    </webHttpBinding> 
+0

¿A dónde va esto? ¿Puedes publicar un fragmento completo de web.config? –

+0

Muchas gracias, ¡salvaste el día! –

+0

Gracias me salvaste muchas horas – coderman

0

"No hay canales que escuchan activamente" suena como lo que dice. No había nada escuchando el puerto 17005 en el momento en que se realizó la solicitud.

Asegúrate de que sea la URL correcta. Prueba de que al emitir el siguiente comando desde una ventana de símbolo del sistema en el servidor:

telnet localhost 17005Introduzca
GET /Introduzca; Nota: esto no se hará eco de
Introduzca

Si esto funciona (conecta y recupera algo de IIS), luego ejecuta la misma prueba desde una máquina cliente en el otro extremo del equilibrador de carga. Por supuesto, en ese caso, use el nombre de host completo en lugar de localhost.

0
<system.serviceModel> 
    <bindings> 
     <webHttpBinding> 
     <binding name="TransportSecurity"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None"/> 
      </security> 
     </binding> 
     </webHttpBinding> 
    </bindings> 
    <services> 
     <service name="Service" behaviorConfiguration="ServiceBehaviour"> 
     <endpoint address="" binding="webHttpBinding" behaviorConfiguration="webMyAcc" bindingConfiguration="TransportSecurity" contract="IService"/> 
     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="ServiceBehaviour"> 
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     </serviceBehaviors> 
     <endpointBehaviors> 
     <behavior name="webMyAcc"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <client />`enter code here` 
    </system.serviceModel> 
Cuestiones relacionadas