Question

I am in to a project that uses Silverlight and am not quite clear on few things with SL.

I understand that SL downloads the xap on to the client browser and makes a lot of things easier that way. The aspx or html page loads SL plugin and downloads xap in browser. I have my web application deployed in IIS and have few WCF web services hosted on IIS (http) and also a few as windows services (net.tcp).

What about wcf service calls that I make from Silverlight code ? Since I can call WCF http or net.tcp based services directly from Silverlight code, it makes me wonder if the SL client is able to directly talk to the web services from browser (or) SL calls run to website which then makes the service calls ?

I am guessing am missing to understand some basics here. Please can someone explain what happens in this scenario in SL. Any links to some deeper understanding is much appreciated.

Thanks.

Was it helpful?

Solution

Silverlight can communicate directly with about anything in the local or external network when tcp is the underlying protocol, bar some security restrictions.

When you communicate with a local WCF Service based on tcp, for example, you still need the clientaccesspolicy.xml be served by http on the save host - or run Silverlight with elevated permissions.

For http, Silverlight can use both ask the browser to make a request or make a request directly (I'm not sure which is used for wcf), tcp will always be done from the plugin directly.

The Silverlight application has to be hosted by a website, but the website doesn't need to do anything beyond that for Silverlight to work, or for it to access a WCF Services. You can host a Silverlight app as purely static files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top