WCF Failed to invoke the service. Possible causes:the service is offline or inaccessible

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.