Accessing Cross-Domain Services

Version: 1.0.0

Description

Silverlight applications provide a rich interactive user interface in SharePoint 2010. Silverlight cannot access resources and services outside of the domain that served up the application. A ClientAccessPolicy allows Silverlight to access a resources and services in a different domain. This lab will demonstrate cross-domain access with and without a ClientAccessPolicy file.

Overview

Silverlight applications provide a rich interactive user interface in SharePoint 2010. Silverlight cannot access resources and services outside of the domain that served up the application. A ClientAccessPolicy allows Silverlight to access a resources and services in a different domain. This lab will demonstrate cross-domain access with and without a ClientAccessPolicy file.

Objectives

This lab will demonstrate how a ClientAccessPolicy file will alow Silverlight to access a a services in a domain different than the domain the application was loaded from.

  • Demonstrate a Silverlight Web Part accessing a service from the same domain.
  • Demonstrate a Silverlight Web Part accessing a service from a different domain.
  • Learn how to deploy a ClientAccessPolicy to allow cross-domain access.

System Requirements

You must have the following items to complete this lab:

  • 2010 Information Worker Demonstration and Evaluation Virtual Machine
  • Microsoft Visual Studio 2010
  • Silverlight WebPart

Setup

You must perform the following steps to prepare your computer for this lab...

  1. Download the 2010 Information Worker Demonstration and Evaluation Virtual Machine and create the Hyper-V image.
  2. Install the Visual Studio 2010 Silverlight Web Part. The Silverlight Web Part is an add-on to Visual Studio 2010.
  3. Create a document library named SilverlightXaps located at https://intranet.contoso.com/silverlightxaps. This is where you will store the Silverlight Xap in SharePoint.

Exercises

This Hands-On Lab comprises the following exercises:

  1. Deploy the Silverlight ListViewer Web Part to intranet.contoso.com
  2. Deploy the Silverlight ListViewer Web Part to fnweb.contoso.com
  3. Deploy the ClientAccessPolicy.xml

Estimated time to complete this lab: 20 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises.
    • AccessingCrossDomainServices\Source\begin\ListViewerWebPart.sln: This soution is a a Silverlight Web Part with the starter code commented out. The Web Part displays a list of list names for the intranet.contoso.com site.
    Note:
    Inside each exercise folder, you will find an end folder containing a solution with the completed lab exercise.