El servidor ha rechazado las credenciales del cliente, WCF como Servicio de Windows
Puedo conectarme a mi servicio WCF con la aplicación Win-form, sin embargo, no puedo hacerlo con mi servicio de Windows. Cada vez que disparo open () al proxy, arroja el siguiente error
El servidor ha rechazado las credenciales del cliente
Excepción interna: System.Security.Authentication.InvalidCredentialException: el servidor ha rechazado las credenciales del cliente.
---> System.ComponentModel.Win32Exception: el intento de inicio de sesión falló
--- Fin del seguimiento de la pila de excepción interna ---
at System.Net.Security.NegoState.ProcessAuthentication (LazyAsyncResult lazyResult)
at System.Net.Security.NegotiateStream.AuthenticateAsClient (credencial NetworkCredential, enlace de ChannelBinding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowImpersonationLevel)
at System.Net.Security.NegotiateStream.AuthenticateAsClient (Credencial NetworkCredential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowImpersonationLevel)
at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade (Stream stream, SecurityMessageProperty & remoteSecurity)
ntenté buscar la solución, pero ninguno cumplió con mis requisitos, por lo tanto publicado.
Por favor ayuda..
Actualización 1:
@ A.R., Intenté con
client.ClientCredentials.Windows.AllowedImpersonationLevel =
System.Security.Principal.TokenImpersonationLevel.Impersonation;
pero fue en vano
Actualización 2:
onfiguración del servicio @WCF
<system.serviceModel>
<diagnostics performanceCounters="All" />
<bindings>
<netTcpBinding>
<binding name="myBindingForLargeData" maxReceivedMessageSize="5242880" maxConnections="10">
<readerQuotas maxDepth="64" maxStringContentLength="5242880" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
</binding>
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="WCFService.ServiceBehavior"
name="WCFService.CollectorService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="myBindingForLargeData"
name="netTcpEndPoint" contract="WCFService.ICollectorService" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
name="mexTcpEndPoint" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8010/WCFService.CollectorService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFService.ServiceBehavior">
<serviceMetadata httpGetEnabled="False"/>
<serviceDebug includeExceptionDetailInFaults="True" />
<serviceThrottling
maxConcurrentCalls="32"
maxConcurrentSessions="32"
maxConcurrentInstances="32"
/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>