Dmitriy Efremenko
Dmitriy Efremenko

Reputation: 11

Client can't open service on Win8

I use WSHttpBinding for may wcf app. And I have a problem when I try running client on Windows 8.1 (not Pro). The application crashed every time when run Service.Open()

Binding configuration:

WSHttpBinding binding = new WSHttpBinding();
binding.MaxReceivedMessageSize = 524288; 
binding.ReliableSession.Enabled = true;
binding.MessageEncoding = WSMessageEncoding.Text;
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;

For other operating system it's work well.

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

Inner exception: Security validation error message.

Upvotes: 1

Views: 88

Answers (1)

Margus
Margus

Reputation: 20068

Metro apps (win 8) support following WCF bindings:

  • BasicHttpBinding
  • NetTcpBinding
  • NetHttpBinding
  • CustomBinding

WSHttpBinding is not supported!

In win 8.1 win WSHttpBinding does work and should be used, because Microsoft have enhanced the security in the LSAS in 8.1 / 2012 R2 and BasicHttpBinding should fail due to it is no longer supported for sending the users identity information over the network.

I am guessing you are using WSHttpBinding same way - you want to use username/password and send them over network.

Your case should be : Message Security with a User Name Client enter image description here

I exactly do no know what the problem is, but it seems to be trust issues. Your error is thrown because your security validation fails in validation.

If program worked on win 8.1 pro and not win 8.1:

  • and you use username + certificate to validate then reinstall certificate
  • and you use username + password to validate then check if domain user exists and if it tries to connect with the right domain.

Other then that I would be some fluke chance like :

  • certificate does not exit
  • certificate does not have privileges needed
  • certificate is based on some other certificates that is invalid, uninstalled, expired or ...
  • certificate or it's base certificates use algorithm that is not supported

Upvotes: 1

Related Questions