none
the caller was not authenticated by the service RRS feed

  • Question

  • I've read the many other posts, but none have been able to help me.  I'm running a WCF IIS project in one instance of Visual Studio, and in another I have a web forms client.  The above error is what I get when I run both locally and the site tries to connect to the service. The EXACT same WCF code running on the server works when the same client running locally connects to it.  I can't figure out why.  I've tried to enable tracing but cannot get a file to generate.  Here's my client config

         <client>
          <endpoint address="http://localhost:64974/Service1.svc/ws" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService" contract="ServiceReference1.IService" name="WSHttpBinding_IService">
            <identity>
              <dns value="host"/>
            </identity>
          </endpoint>
        </client>

    and here's the WCF config

         <services>    
          <service name="Service1">
            <endpoint address="ws" binding="wsHttpBinding" contract="IService">
              <identity>
                <dns value="host"/>
              </identity>
            </endpoint>
          </service>
        </services>

    I've changed the service names to remove private data

    Writing code is fun

    Monday, October 14, 2013 8:36 PM

Answers

  • Hi,
    >>the caller was not authenticated by the service

    I see that you are using the wsHttpBinding, wsHttpBinding employs message level security and uses Windows security as the default client authentication. But the basicHttpBinding has no security by default.

    So for your question, here are two solutions.

    One solution is to change the wsHttpBinding to the basicHttpBinding.

    The other solution is to use the wsHttpBinding, then you will need to add windows credentials as below:

    proxy.ClientCredentials.Windows.ClientCredential.UserName = "MyUser";
    proxy.ClientCredentials.Windows.ClientCredential.Domain = "MyDomain";
    proxy.ClientCredentials.Windows.ClientCredential.Password = "MyPassword";
    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.

    Tuesday, October 15, 2013 2:59 AM
    Moderator
  • Thank you, I managed to get it to work somehow by making a new client from scratch

    Writing code is fun


    Thursday, October 17, 2013 2:45 AM

All replies

  • Hi,
    >>the caller was not authenticated by the service

    I see that you are using the wsHttpBinding, wsHttpBinding employs message level security and uses Windows security as the default client authentication. But the basicHttpBinding has no security by default.

    So for your question, here are two solutions.

    One solution is to change the wsHttpBinding to the basicHttpBinding.

    The other solution is to use the wsHttpBinding, then you will need to add windows credentials as below:

    proxy.ClientCredentials.Windows.ClientCredential.UserName = "MyUser";
    proxy.ClientCredentials.Windows.ClientCredential.Domain = "MyDomain";
    proxy.ClientCredentials.Windows.ClientCredential.Password = "MyPassword";
    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.

    Tuesday, October 15, 2013 2:59 AM
    Moderator
  • Thank you, I managed to get it to work somehow by making a new client from scratch

    Writing code is fun


    Thursday, October 17, 2013 2:45 AM
  • Please mark the answer which help you.

    Thanks.

    Thursday, October 17, 2013 3:21 AM