Communication between Silverlight and WCF (5) Silverlight Application and WCF service publishing methods

Source: Internet
Author: User
Tags iis silverlight

A friend of the last blog post asked about the issue of Silverlight program release, the last one is a Silverlight access to the host on the console WCF, in fact, about WCF and SILVERLIHGT communication problems there are several ways, here is a list of

The client and server use HTTP protocol communication (in two, same domain or different domain)

The client and server use TCP protocol communication (in two ways, the server is on IIS and the server is not on IIS, console, Windows Services, WinForm, etc.)

Because of the way many, here is only the common way to explain

1,silverlight and WCF are in the same domain (HTTP/TCP protocol is available)

This is the simplest way, as shown below,

WCF is directly hosted in IIS to rely on the lifecycle management Services of IIS, so this mode, as long as the Wcftcpsl.web can be released, Where WCFSERIVCE.SVC can provide services independently, wcftcpsltestpage.aspx provide Silverlight loading.

2, Silverlight and WCF are not in the same domain (HTTP/TCP protocol is available)

Usually, to better maintain the code and keep the structure of the code clear, the WCF service will be made independent of project, where the web and WCF services belong to different applications, and the policy files need to be introduced into the web because Silverlight Cross-domain access The specified port is required for authentication.

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.