Tuesday, August 5, 2014

Could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message in WCF
During an implementation of WCF Operation Contract I encountered an error as per the Title.
I was returning wrong parameter value from Operation contract which takes Message Contract as parameter .Kindly refer an image to understand real fact.
There are some limitation which are listed below,which we should keep in mind during implementation of WCF service

You can use the Message class as an input parameter of an operation, the return value of an operation, or both. If Message is used anywhere in an operation, the following restrictions apply:
  • The operation cannot have any out or ref parameters.
  • There cannot be more than one input parameter. If the parameter is present, it must be either Message or a message contract type.
  • The return type must be either void, Message, or a message contract type
Hope it will help you sometime.
To know more about MVC please go through with given below link.
MVC Articles
Enjoy Coding and Reading Smile


Post a Comment