Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

wcf

wpf

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?

like image 934
Ranjita Das Avatar asked Oct 04 '22 11:10

Ranjita Das


1 Answers

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/

like image 141
stack247 Avatar answered Oct 18 '22 21:10

stack247