Silverlight and WCF error handling: Server not found (4)

Source: Internet
Author: User

The first article describes how to handle the problem through configuration. This article providesCodeThe main idea is to directly paste the class diagram through custom features:

Given the source code, this class is not analyzed in detail. If you have mastered the previous configuration method, it is not difficult to understand the code.

In the service contract, we add the implemented wcferrorbehavior and wcfsilverlightfaultbehavior features.

 
[Wcferrorbehavior]

[Wcfsilverlightfaultbehavior]

Public ClassTestservice: itestservice

 
{}

open web. config. You can see that no node is modified. During the runtime, you can see the error message of WCF. For example, the Code section is not described in detail in this article, if you are interested, you can directly study the code. The error handling of Silverlight and WCF has come to an end for a while. I hope you will point out the shortcomings in this article for improvement. Download the code: wcfexceptionhander.rar

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.