The following error was encountered while writing WCF today:
The debugging process found that there were no exceptions for each procedure, but the following error occurred when returning data to the caller.
Failed to invoke the service. Possible causes:the service is offline or inaccessible; The Client-side configuration does not match the proxy; The existing proxy is invalid. Refer to the stack of trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
last check, the cause of this error is
[DataContract]
Public class Student
{
[DataMember]
public int PersonId {get;}
[DataMember]
Public String Name {get; set;}
}
Change to the following:
[datacontract]
public class Student
{
[DataMember]
public int PersonId {get;private set;}
[DataMember]
Public String Name {get; set;}
}
WCF The service serialization read-only attribute is problematic and causes failed to invoke the service.
WCF Failed to invoke the service. Possible causes:the service is offline or inaccessible