Friday, April 4, 2008

Silverlight 2.0 crossdomain programming

'Crossdomain' is a common word in Silverlight programming from the days of wpf/e itself.Actually what is 'crossdomain' ?
It's nothing but trying to access something located at different domains other than the silverlight application's domain.

These calls are blocked in silverlight.But we can't create a complete application without making these calls.for eg: if we need to access a database ,we should make these types of calls since Silverlight dont have direct database suppport.In such situations we do the following.

Create a proxy in the same domain of Silverlight application and route calls through that proxy.Proxy usually be a webservice or WCF service which dont have the crossdomain limitation.

There are so many things which we should take care of when using these methods.Some links are given below which helps you to improve your application's communication skill.

http://blogs.msdn.com/silverlightws/archive/2008/03/30/some-tips-on-cross-domain-calls.aspx
http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2008/03/19/WCF-Integration-in-Silverlight-2-Beta-1.aspx

No comments: