Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am developing an application using a third party service URL. While consume the service from my windows application, got an exception as follows
C#
"SecurityNegotiationException: The caller was not authenticated by the service."
I have tested with same using soapUI, it gives error
"The message could not processed. This is mostly because the action http://tempuri.org..."
Client config:
XML
<system.serviceModel>
    <diagnostics>
      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IEVoucherSvc" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
          textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
            enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
              algorithmSuite="Default" establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://thirdparty:port/Service.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IEVoucherSvc"
        contract="WCFSerRefer.IEVoucherSvc" name="WSHttpBinding_IEVoucherSvc">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>

Thanks in advance..
Posted
Updated 24-May-15 1:56am
v3
Comments
ZurdoDev 24-May-15 12:20pm    
Doesn't the error tell you the problem? You aren't authenticated. Are you passing a form of authentication to the service?

1 solution

Why the dns value is localhost??
Remove idetity tag or add proper dns value (server name).

TIA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900