WCF Service with security mode none -
my wcf service works fine security mode="transport" , clientcredentialtype="windows" (with client , service on either 1 machine or two). need put service on other side of firewall windows authentication not possible. know can either install x.509 certs or use security="none" (to add own security protocol). cannot "none" work! keep getting 'the socket connection aborted' error.
here config, please let me know if spot anything. have tried without 2 lines specify clientcredentialtype="none" makes no diff. p.s. each time make config change stop , restart both client , service.
server config
<system.servicemodel> <services> <service name="outerservice.outcardtrx"> <endpoint address="" binding="nettcpbinding" contract="outerservice.ioutcardtrx"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mextcpbinding" contract="imetadataexchange"/> <host> <baseaddresses> <add baseaddress="net.tcp://jimt4.campus.internal:8081/pcioutservice"/> </baseaddresses> </host> </service> </services> <bindings> <nettcpbinding> <binding name="nettcpbinding"> <security mode="none" > <transport clientcredentialtype="none" /> <message clientcredentialtype="none" /> </security> </binding> </nettcpbinding> </bindings> client config:
<system.servicemodel> <bindings> <nettcpbinding> <binding name="nettcpbinding_ioutcardtrx" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" transactionflow="false" transfermode="buffered" transactionprotocol="oletransactions" hostnamecomparisonmode="strongwildcard" listenbacklog="10" maxbufferpoolsize="524288" maxbuffersize="65536" maxconnections="10" maxreceivedmessagesize="65536"> <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" /> </security> </binding> </nettcpbinding> </bindings> <client> <endpoint address="net.tcp://jimt4.campus.internal:8081/" binding="nettcpbinding" bindingconfiguration="nettcpbinding_ioutcardtrx" contract="ocs.ioutcardtrx" name="nettcpbinding_ioutcardtrx"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.servicemodel>
not 100% sure reason, binding security settings don't match between client , service.
note default security nettcpbinding transport (for mode). define none in binding in service config, binding never assigned service endpoint, service using default settings nettcp.
on other hand, setting binding configuration on client.
try setting binding configuration in service endpoint this:
<endpoint address="" binding="nettcpbinding" bindingconfiguration="nettcpbinding" contract="outerservice.ioutcardtrx"> this assign specified binding endpoint, security set "none". recommend changing binding configuration name other "nettcpbinding" avoid possible confusion.
Comments
Post a Comment