
Preparing the server
So far, we have prepared the development environment. Now, it is time to make sure that we have the necessary configuration for the SharePoint 2010 server in which we are going to integrate Silverlight applications.
In order to complete all the examples that we will develop throughout this book, you must be an administrator of a SharePoint site collection. SharePoint Server 2010 or SharePoint Foundation 2010 must be installed in the same computer that runs Visual Studio 2010. You can check the necessary steps to perform a SharePoint Server 2010 or SharePoint Foundation 2010 installation for your development computer at http://msdn.microsoft.com/en-us/library/ee554869.aspx. Follow these steps to ensure that you are a site collection administrator:
- Open your default web browser, view the SharePoint site, and log in with your username and password. You have to enter the SharePoint server URL. In our examples, we will use http://xpsgaston as our default SharePoint 2010 site. However, you have to replace it with your SharePoint 2010 site URL. Your default site will appear, in this case,http://xpsgaston/SitePages/Home.aspx, as shown in the following screenshot:
- Click Site Actions | Site Permissions and a list of users with their permission levels will appear.
- Now, click on Site Collection Administrators in the ribbon. A new dialog box with the names of the users with administrator rights on this site collection will appear.
- If your user name appears in the text box, you are a Site Collection Administrator.
Tip
If you cannot see the Site Collection Administrators button in the ribbon, it means that you don't have site collection administrator privileges on the site. In this case, you have to request this permission from the SharePoint site administrator.
Browsing SharePoint Site collections
Once we have ensured that our username is a Site Collection Administrator, we can use Server Explorer in Visual Studio to browse a SharePoint site.
- Start Visual Studio as a system administrator user. In Windows Server 2008 R2, 2008, and 2003, if you are already logged as Administrator on the machine you can simply run the application. However, in Windows 7 or Windows Vista, you can do it by right-clicking on its shortcut and selecting Run as administrator in the context menu that appears, as shown:
- Activate the Server Explorer palette. If it isn't visible, you have to select View | Server Explorer in the main menu.
- Click on the expand button for SharePoint Connections. If the name of your desired SharePoint 2010 server doesn't appear in the list, you can manually connect to the server. You can do it by right-clicking on SharePoint Connections and selecting Add Connection... in the context menu that appears. Then, you have to enter the URL for the server, for example,
http://xpsgaston
and click OK in the dialog box that appears. If your user has the previously explained privileges, the server will appear in the list. - Now, click on the expand button for the SharePoint server and you will be able to browse its different nodes. Every component of a SharePoint site is represented by a node in the Server Explorer tree view. You can inspect the properties for each node, as shown in the following screenshot:
- You can view some lists in your default web browser by right-clicking on a node and then selecting View in Browser in the context menu that appears. For example, you can do it for the node Home | Lists and Libraries | Site Pages and your default web browser will display all the pages. In this case, the URL shown is http://xpsgaston/SitePages/Forms/AllPages.aspx.
Tip
Remember to run Visual Studio as a system administrator user in order to interact with SharePoint for all the examples covered in this book.