C # Remote Call technology WebService Sunflower Treasure Book

Source: Internet
Author: User

I. Introduction of the Course

Straight to the point, before learning a stupid want to ask everyone, about WebService remote Procedure call Technology (RPC) you really do? Don't talk to the old man. WebService technology is outdated, if you secretly tell you in fact I really do not webservice words, then congratulations, because you in the boundless it programming world found this "C # Remote Call technology WebService Sunflower Treasure Book"! Once an unknown lecturer said such a famous saying: An RPC technology will not, then entry door RPC technology will not!

This session contains the following points of knowledge.

1, C # WebService commonly used several methods of invocation.

2. WebService how to use asynchronous calls. (based on asynchronous delegate Begininvoke/endinvoke, delegate-based event mechanism, async task Async Programming Mode)

3, C # WebService How to ensure that the client access in a secure manner.

4. C # Dynamically creates WebService instances through reflection (Reflection).

5. The basic use of Microsoft's lightweight IOC framework unity.

Here's a hard ad: The next sharing course, the stupid plan will bring you the "C # Service-oriented programming technology for WCF from beginner to practical walkthrough."

If you are interested in this sharing lesson, then please study with AH-stupid. Needless to say, directly on dry goods, we do not produce dry goods, we are just dry goods porter.

Second, C # WebService two different ways to use the reference

2.1, Web references Way reference.

2.2, Service references way reference.

Iii. C # WebService How to use asynchronous calls

3.1, based on the asynchronous delegate Begininvoke/endinvoke.

3.2. Event mechanism based on delegate events.

3.3. Async Task-based asynchronous programming model.

Iv. C # WebService How to ensure that clients are accessed in a secure manner

4.1, first talk about what is safe? What problems do we need to solve?

Call security : Since WebService is exposed to the public network, how to prevent illegal users from invoking our services? So we need to solve this problem: authorization.

Data transfer Security : Because our data is transmitted through ciphertext on the network can easily be stolen. So we need to solve this problem: data theft.

The above explanation is only a narrow understanding of the stupid, network security also includes many aspects, session hijacking, session tampering and so on.

4.2, a stupid share of the current several common solutions.

1, WebService each method needs to pass a token fixed parameter, different caller's respective token value is not the same. The server has a set of rule algorithms that generate token values, persisting this value in a relational database or in a file and in an in-memory database.

2. WebService uses the authentication mechanism of ASP. Common authentication methods are: Form authentication, Integrated Windows authentication, basic basic certification, Digest Digest authentication,

3, WebService using SSL to achieve encrypted transmission.

HTTPS (full name: Hyper Text Transfer Protocol over secure Socket Layer) secure transport protocol. (highly recommended)

4, through the webservice to provide us with the SoapHeader to achieve user authentication. (highly recommended)

A fool will give you a practical link to share an elegant way to authenticate against WebService.

5, the above several solutions to combine the use. (Personal recommended Use: ③+④ two scenarios for combination)(highly recommended)

Summary: We can use SoapHeader to ensure the authorization of webservice, can guarantee the encryption of data through SSL, prevent the network to listen!

V. How C # WebService is used SoapHeader for authentication
WebService authentication VI. C # WebService How to make unified portal calls in an elegant way

6.1, Unity Container way to get WebService service instance.

6.2, reflect reflection way to get WebService service instances (recommended).

C # Remote Call technology WebService Sunflower Treasure Book

Related Article

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.