Friday, April 10, 2009, 18:35 - SilverLight
Posted by Administrator
Some things that you need to know before you start developping SilverLight solutions that displays data from SharePoint by using the default webservices.Posted by Administrator
Asynchronous
Every call to a webservice from Silverlight is asynchronous
crossdomain.xml and clientaccesspolicy.xml
While debugging, your Silverlight application runs on a localhost and hereby it cannot connect to a webservice on another domain. In order to tell silverlight that it has access to these webservices you need to place the crossdomain.xml on the root of the webserver where these webservices exist.
In sharepoint this is a problem, because you cannot simply put them in the root by copy paste in IIS explore mode. You need to use sharepoint designer to connect to the sharepoint server and add the xml file. Afterwards make sure the file is available at this location:
http://server:port/crossdomain.xml
What happens when your server contains a special url like http://server:port/ test/
http://http://server:port/ test/crossdomain.xml, you cannot copy paste this xml file using SharePoint Designer because it won't open http://devmoss:8080!
More info: http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx
Create a proxy service!
In order to keep the silverlight application clean, reference your custom webservice. This webservice exposes the data needed in the silverlight application. Make sure that you set the correct impersonation settings in the web.config.
Enable the invoke button remotely on your webservice




( 3 / 560 )

Tom Van Gaever - Blog
Avatar






