找到你要的答案

Q:No signature message parts were specified for messages

Q:未指定消息的签名消息部分

I have a two WCF services,one is calling another one.I am using these methods for validating users. This is my first service method

 [OperationContract]
        [FaultContract(typeof(MyNawrasWCFException))]
        bool ValidateUser(string username);

and internally it is calling another service method like this(its not calling it directly,but is calling through an adapter)

 ServiceClient2 client = new ServiceClient2();
                client.Open();
                isValidated = client.ValidateUser(username);
                client.Close();

and in Service2 I have method like this

[OperationContract]
        [FaultContract(typeof(bool))]
        bool  ValidateUser(string username);

This is working fine on my local machine,but when I deployed it on server,its

showing error
No signature message parts were specified for messages with the 'http://tempuri.org/IService2/ValidateUserExceptionFault' action.

I have read on google to fix this error,I need to update the service reference. I have updated the reference but still same error. I have other methods too but its showing error only in this method

我有一二个WCF服务,一个是调用另一个。我利用这些方法用于验证用户。这是我的第一个服务方法

 [OperationContract]
        [FaultContract(typeof(MyNawrasWCFException))]
        bool ValidateUser(string username);

内部调用另一种服务方法(不是直接调用,而是通过适配器调用)

 ServiceClient2 client = new ServiceClient2();
                client.Open();
                isValidated = client.ValidateUser(username);
                client.Close();

在服务我有这样的方法

[OperationContract]
        [FaultContract(typeof(bool))]
        bool  ValidateUser(string username);

这在我的本地机器上运行的很好,但是当我部署在服务器上时,它的

showing error
未指定消息的签名消息部分 with the 'http://tempuri.org/IService2/ValidateUserExceptionFault' action.

我已经在谷歌上阅读来修复这个错误,我需要更新服务参考。我更新了参考,但同样的错误。我也有其他方法,但它的显示错误,只有在这种方法

c#  wcf