Tech Off Post

Single Post Permalink

View Thread: Cant get webservice to work. Could not be loaded error
  • User profile image
    vesuvius

    You can fix this by reading the message, but more code is required.

    You have decorated one or more objects with [MessageContract] instead of [OperationContract]. When you use this attribute you no longer pass individual parameters but the whole object instead. Please replace MessageContract with OperationContract or only pass in the class that has the MessageContract attribute

     

      
    public void AddUser(Recipient recipient)
    {
    
    }
    
    [MessageContract]
    public class Recipient
    {
    
    }