Ranjita Das
Ranjita Das

Reputation: 443

"An unsecured or incorrectly secured fault was received from the other party"

I'm getting:

Error

"An unsecured or incorrectly secured fault was received from the other party. See the inner Fault Exception for the fault code and detail."

I've done this on the client side and I've done the same in a console application, but that error came may be something conflict.

I've checked the app.config as well.

Code is:

<client>
  <endpoint address="net.tcp://localhost:5054/player" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IPlayerService" contract="PlayerService.IPlayerService" name="NetTcpBinding_IPlayerService">
    <identity>
      <dns value="pident.cloudapp.net"/>
    </identity>
  </endpoint>
  <endpoint address="net.tcp://localhost:5049/public" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IPublicService" contract="Public Service.IPublicService" name="NetTcpBinding_IPublicService"/>
  <endpoint address="net.tcp://localhost:5051/user" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IUserService" contract="User Service.IUserService" name="NetTcpBinding_IUserService">
    <identity>
      <dns value="pident.cloudapp.net"/>
    </identity>
  </endpoint>

Does anyone have any idea?

Upvotes: 6

Views: 45379

Answers (2)

Shiva Saurabh
Shiva Saurabh

Reputation: 1289

In command prompt, check if the testclient is accepting the parameters correctly or not.

Example:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>wcftestclient.exe http://localhost:31/AuthenicationService.svc?wsdl

If the inputs you have given is not matching, there is problem with the service.
Rather you have to re-look into the service created.
If there is no problem found in it, only then go for the client side.

Upvotes: 0

stack247
stack247

Reputation: 5747

I just had this issue and had to turn off security context on WCF bindings. You need to turn them off on the bindings in both the client and the service.

Here's the config file if your WCF is IIS-hosted:

<ws2007FederationHttpBinding>
    <binding>
        <security mode="TransportWithMessageCredential">
            <message establishSecurityContext="false" />
        </security>
    </binding>
</ws2007FederationHttpBinding>

See this post: http://stack247.wordpress.com/2013/05/28/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party/

Upvotes: 4

Related Questions