Principales respuestas
No se genera parametro encodedValue en el cliente WCF

Pregunta
-
Hola a todo.... y que tengan un buen dia.
Peleando otra vez con mi servicio que suma dos numeros, he tratado de implementarlo en una red local. Para eso, basandome en los links:
El problema es que cuando uso la herramienta svCutil para gegerar el codigo de configuracion para el cliente, en la seccion <identity> me sale:
<client> <endpoint address="net.tcp://localhost:9999/WCFSumar/" binding="netTcpBinding" bindingConfiguration="netTcpEndPoint" contract="IWCFSumar" name="netTcpEndPoint"> <identity> <userPrincipalName value="MASTER\Wersly" /> </identity> </endpoint> </client>
cuando deberia salirme algo parecido a esto:
<client> <endpoint address="http://localhost/service1/servic1.svc/secure" binding="wsHttpBinding" bindingConfiguration="bind1" contract="Icontract1" name="WSHttpBinding_Icontract1"> <identity> <certificate encodedValue="AwAAAAEAAAAUAAAAOTDk6LO4LsMQaY+65EgACb==" /> </identity> </endpoint> </client>
Tengo la siguiente configuracion:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation debug="true" /> </system.web> <!-- Al implementar el proyecto de la biblioteca de servicios, el contenido del archivo de configuración se debe agregar al archivo app.config del host. La configuración del sistema no admite archivos de configuración en las bibliotecas. --> <system.serviceModel> <client> <endpoint behaviorConfiguration="Mybehavior" binding="netTcpBinding" bindingConfiguration="" contract="WCFServicio.IWCFSumar" name="Cliente" kind="" endpointConfiguration="" /> </client> <services> <service behaviorConfiguration="Mybehavior" name="WCFServicio.WCFSUmar"> <clear /> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="NetTcpMetadataPoint" contract="IMetadataExchange" /> <endpoint address="" binding="netTcpBinding" bindingConfiguration="" name="netTcpEndPoint" contract="WCFServicio.IWCFSumar" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9999/WCFSumar/" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Mybehavior"> <serviceCredentials> <serviceCertificate findValue="EnterpriseSoft" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/> <clientCertificate> <certificate findValue="EnterpriseSoft" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My"/> </clientCertificate> </serviceCredentials> <!-- Para evitar revelar información de los metadatos, establezca el valor siguiente en false y quite el extremo superior de los metadatos antes de la implementación --> <serviceMetadata httpGetEnabled="false"/> <!-- Para recibir detalles de las excepciones en los fallos, con el fin de poder realizar la depuración, establezca el valor siguiente en true. Para no revelar información sobre las excepciones establézcalo en false antes de la implementación --> <serviceDebug includeExceptionDetailInFaults="False" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="Mybehavior" > <clientCredentials> <clientCertificate findValue="EnterpriseSoft" storeLocation="LocalMachine" x509FindType="FindBySubjectName" storeName="My"/> <serviceCertificate> <authentication certificateValidationMode="PeerOrChainTrust"/> </serviceCertificate> </clientCredentials> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> </configuration>
¿Cual es el problema? ¿Que puede estar pasando? Alguien tiene alguna idea.
Gracias de antemano.
EnterpriseSoft Perú Chachapoyas - Amazonas - Perú.
Respuestas
-
Solucionado.
Habia que hacer esto:
Paso 2: Configurar wsHttpBinding con certificado de autenticación y seguridad de los mensajes
revisar el link:
Configuracion de servicio con certificado
EnterpriseSoft Perú Chachapoyas - Amazonas - Perú.
- Marcado como respuesta Terricolaw martes, 8 de mayo de 2012 16:19