.net - NetTcpBinding with Transport mode and ClientCridentialType None mode asking for certificate to start the host -
is not possible utilize transport security nettcpbinding none authentication? don't want utilize certificate service, used below config service , when starting service host getting application error mentioned below(asking certificate, didn't mention certificate anywhere in app). after set service credentials in behavior , service start running. can tell me whats cause this?
error : "the service certificate not provided. specify service certificate in servicecredentials. "
<service name="consoleapplication1.wcfservice1" behaviorconfiguration="" > <endpoint address="net.tcp://localhost:853/wcfservice1" binding="nettcpbinding" bindingconfiguration="securitycheckbinding" name="tcpendpoint" contract="consoleapplication1.iservice1" /> <host> <baseaddresses> <add baseaddress="net.tcp://localhost:853/wcfservice1" /> </baseaddresses> </host> </service> <bindings> <nettcpbinding> <binding name="securitycheckbinding"> <security mode="transport"> <transport clientcredentialtype="none" ></transport> </security> </binding> </nettcpbinding> </bindings>
this scenario getting above mentioned error, when specified trusted certificate params , start running.
<behaviors> <servicebehaviors> <behavior name="myservicebehaviour"> <servicecredentials> <servicecertificate findvalue="mytestca" x509findtype="findbyissuername" storelocation="localmachine" storename="my" /> </servicecredentials> </behavior> </servicebehaviors> </behaviors>
you must install certificate , configure service server-side because selected nethttpbinding transport security. means channel must encrypted , signed , certificate used provide keys this. need "something" sign , encrypt message, it's why need certificate. find hack create works without certificate, message not signed/encrypted. installing certificate quite easy, , utilize certificate auto-signed (generated on server itself) doesn't cost money. that's on server - clients need not install default.
.net wcf security
No comments:
Post a Comment