Monday, August 27, 2007

Silverlight 1.1 (Alpha) cross domain webservice access makes mashups tricky - Jon Galloway

 

 

Any web mashups, by definition, require cross-domain calls. Those cross-domain calls may happen on the client (in the browser) or on the server. Regardless of the client technology (AJAX, Flash, Silverlight, etc.), cross domain calls on the client are always more complex that server-side cross-domain calls, and for good reason. It's tricky in AJAX, and it's downright difficult in Silverlight. You'll know that Silverlight development has become more widespread when you hear a lot more complaints about this problem.

I previously wrote about using a static port to eliminate this problem when you're calling back to your own server but Silverlight is detecting a cross-domain call. That's caused by the ASP.NET Development Server running the different projects on different ports (e.g. website on localhost:1234 and webservice on localhost:5678), and you can work around it by just putting the website and webservice in one project with a static port. However, there are plenty of times when you'll want to make a cross-domain call, so we've got to get this figured out.

While helping Rob Conery work through some problems connecting to Amazon Web Services this past week, I wrote up some notes on the issue.

Jon Galloway

No comments: