GOOGLE ADS

lunes, 2 de mayo de 2022

La configuración del cliente WCF da el error "No se pudo procesar el mensaje. Lo más probable es que se deba a que la acción

Mi servicio web devuelve un mensaje de error sin importar las configuraciones que establezca. Recibo el siguiente mensaje de error.

No se pudo procesar el mensaje. Lo más probable es que esto se deba a que la acción 'http://tempuri.org/ITestingWebService/DoWork' es incorrecta o porque el mensaje contiene un token de contexto de seguridad no válido o caducado o porque hay una discrepancia entre los enlaces. El token de contexto de seguridad no sería válido si el servicio anulara el canal debido a la inactividad. Para evitar que el servicio anule prematuramente las sesiones inactivas, aumente el tiempo de espera de recepción en el enlace del extremo del servicio.

Aquí están mis web.configsecciones de servidor y cliente para WCF.

Servidor:

<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ConnectedStoreCCM.TestingWebServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ITestingWebService"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:10:00" bypassProxyOnLocal="false"
transactionFlow="false" hostNameComparisonMode="StrongWildcard"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true" allowCookies="false"
maxReceivedMessageSize="2097152" maxBufferPoolSize="1024768">
<readerQuotas
maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" negotiateServiceCredential="false"
establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ConnectedStoreCCM.TestingWebServiceBehavior"
name="ConnectedStoreCCM.TestingWebService">
<endpoint
address=""
binding="wsHttpBinding"
contract="ConnectedStoreCCM.ITestingWebService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://www.someuri.net/supertest/TestingWebService.svc?wsdl" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>

Cliente:

<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ITestingWebService" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true" allowCookies="false"
maxBufferPoolSize="1024768"
maxReceivedMessageSize="2097152" >
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" negotiateServiceCredential="false" establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint name="WSHttpBinding_ITestingWebService"
address="http://www.someuri.net/supertest/TestingWebService.svc?wsdl"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITestingWebService"
contract="ServiceReference1.ITestingWebService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>


Solución del problema

Lo más probable es que tenga una discrepancia en el contrato de servicio en la ITestingWebServiceinterfaz. Intente ejecutar una "Referencia de servicio de actualización" haciendo clic derecho en la referencia de servicio en Visual Studio y vea si eso soluciona el problema.

No hay comentarios:

Publicar un comentario

Regla de Firestore para acceder a la generación de subcolección Permisos faltantes o insuficientes

Tengo problemas con las reglas de Firestore para permitir el acceso a algunos recursos en una subcolección. Tengo algunos requests document...