none
Configuring a local network for WCF Security modes RRS feed

  • Question

  • Hi there:

    I have several machines connected through a wireless router.

    When I build a WCF Service in one of the machines with "Security mode = 'None'", then I don't have any problem building client applications that access and use that service from other machines.

    But when I try to use a security mode, say "Security mode='Message'", then I start having problems, I get a SecurityNegotiationException: The caller was not authenticated by the service.

    Each machine has it's machine name, windows user name and password. I allow peer to peer file access between them.

    I'm using netTcpBinding this time.

    Please, I need help here...


    Believe you can do it, and you will!!

    Thursday, May 1, 2014 5:53 PM

Answers

  • Hi,

    When you use the mesage security mode, then if the client wants to access the wcf service, then it will need to provide the right credential.

    If all your machines are in the same domain, then you can use the window authentication as following:

    <services>
          <service name="YourService">
            <endpoint address="" binding="netTcpBinding" contract="YourServiceContract" 
    bindingConfiguration="nettcpbindingname"></endpoint> </service> </services> <bindings> <netTcpBinding> <binding name="nettcpbindingname"> <security mode="Message"> <message clientCredentialType="Windows"/> </security> </binding> </wsHttpBinding> </bindings>

    For more information, please try to refer to:
    #WCF Message Security with Windows authenticate on NetTcpBinding:
    http://www.remondo.net/wcf-message-security-windows-credentials-nettcpbinding/ .


    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 2, 2014 6:08 AM
    Moderator
  • Hi,

    If we set all the computers in a domain, then all computers can share accounts. So we can authenticate the wcf service by using the windows authentication.

    Then first thing for creating a domain is that you should have a server.

    For more information, please try to refer to:
    #How to set up a Network Domain:
    http://www.makeuseof.com/tag/set-network-domain/ .

    If you do not want to create a domain, maybe you can try to create a workgroup.

    http://windows.microsoft.com/en-us/windows/create-user-account#create-user-account=windows-7 .

    Best Regards,
    Amy Peng



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, May 9, 2014 2:31 AM
    Moderator

All replies

  • Hi,

    When you use the mesage security mode, then if the client wants to access the wcf service, then it will need to provide the right credential.

    If all your machines are in the same domain, then you can use the window authentication as following:

    <services>
          <service name="YourService">
            <endpoint address="" binding="netTcpBinding" contract="YourServiceContract" 
    bindingConfiguration="nettcpbindingname"></endpoint> </service> </services> <bindings> <netTcpBinding> <binding name="nettcpbindingname"> <security mode="Message"> <message clientCredentialType="Windows"/> </security> </binding> </wsHttpBinding> </bindings>

    For more information, please try to refer to:
    #WCF Message Security with Windows authenticate on NetTcpBinding:
    http://www.remondo.net/wcf-message-security-windows-credentials-nettcpbinding/ .


    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 2, 2014 6:08 AM
    Moderator
  • I'm a newbie in networking.

    How do I set the configuration you are telling me?.

    I have several windows 7 computers connected to a wireless router, and my internet connection is based on dynamic IP address.

    How do I set the same domain for all my machines?

    Do I have to install Remote Server Administration Tools or other tools?


    Believe you can do it, and you will!!




    • Edited by RalphDev Friday, May 2, 2014 3:29 PM
    Friday, May 2, 2014 11:38 AM
  • Hi,

    If we set all the computers in a domain, then all computers can share accounts. So we can authenticate the wcf service by using the windows authentication.

    Then first thing for creating a domain is that you should have a server.

    For more information, please try to refer to:
    #How to set up a Network Domain:
    http://www.makeuseof.com/tag/set-network-domain/ .

    If you do not want to create a domain, maybe you can try to create a workgroup.

    http://windows.microsoft.com/en-us/windows/create-user-account#create-user-account=windows-7 .

    Best Regards,
    Amy Peng



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, May 9, 2014 2:31 AM
    Moderator