2 articles about creating and calling restful WCF Service are recommended.

Source: Internet
Author: User

2 more articles about creating and callingRestful WCF ServiceAspectArticle:

 

Article 1: WCF rest service with XML/JSON response format according to Content-Type Header

The above article introduces the implementation details of the restful WCF Service, which is graphic and easy to read. There are also descriptions of the WCF configuration file, including helpenabled and automaticformatselectionenabled parameter settings, and so on; use of filddler tool; write C #CodeCreate an httpwebrequest object to call the restful WCF Service.

 

Article 2: WCF rest service with JSON (codeproject.com)

The above Article Page introduces some details about creating restful WCF services. The purpose of this file is recommended here: (1) when the client C # code method restful service is used to create a WebClient object, it is different from the previous article to create an httpwebrequest object;

WebClient client = New WebClient ();
Byte [] DATA = client. downloaddata ( " Http: // localhost: 11523/service1.svc/getdata " );
Stream stream = New Memorystream (data );

Datacontractjsonserializer OBJ =NewDatacontractjsonserializer (Typeof(String));
StringResult = obj. readobject (Stream). tostring ();

MessageBox. Show (result );

 

 

(2) Client ApplicationsProgramProvides complete code for download reference.

For other restful WCF services, refer to here.

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.