<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://officeliveblog.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fofficeliveblog.spaces.live.com%2fcategory%2fDevelopers%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Microsoft Office Live Small Business Blog: Developers</title><description /><link>http://officeliveblog.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&amp;_c=BlogPart&amp;partqs=catDevelopers</link><language>en-US</language><pubDate>Wed, 20 Aug 2008 19:55:35 GMT</pubDate><lastBuildDate>Wed, 20 Aug 2008 19:55:35 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://officeliveblog.spaces.live.com/blog/feed.rss</cf:parentRSS><live:type>blogcategory</live:type><live:identity><live:id>8791053953718109947</live:id><live:alias>officeliveblog</live:alias></live:identity><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>The Microsoft Office Live Client Application Connection code sample</title><link>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!626.entry</link><description>&lt;p&gt;&lt;font face=Calibri size=3&gt;The Microsoft Office Live Developer Platform Team has created some sample code to show how you can use Microsoft Office Live Web services to connect your client-side application to Microsoft Office Live data. &lt;/font&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;This code sample takes advantage of the &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb264604.aspx"&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Microsoft Office Live Discovery Web service&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri size=3&gt;, &lt;/font&gt;&lt;a href="http://dev.live.com/blogs/devlive/archive/2007/02/06/97.aspx"&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Windows Live ID for client applications&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri size=3&gt; , and the authentication services provided in the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetauthenticationmanagerclassauthenticatetopic.asp"&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Microsoft System.Net namespace&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri size=3&gt;. Once you know how to combine these services, you can provide access to data in an Office Live subscription from your application without requesting additional credential information.&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri size=3&gt;As an example of accessing Microsoft Office Live data after authentication, the Client Application Connection sample includes code that connects to a Microsoft Office Live server with the user's Windows Live ID credentials to list all documents in one of the user's Microsoft Office Live document libraries.&lt;/font&gt; 
&lt;h2&gt;&lt;em&gt;&lt;font face=Cambria color="#c0504d"&gt;Download the sample&lt;/font&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;Client Application Connection is provided as sample code. You can copy snippets of this code or duplicate them in your application to help you provide authenticated connections.&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri size=3&gt;To download the .exe file, go to the &lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=470378A4-FA2C-4C42-8659-9C84190CE2A2&amp;amp;displaylang=en"&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Microsoft Download Center&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri size=3&gt;. &lt;/font&gt;
&lt;p style="text-indent:-0.25in;tab-stops:.5in"&gt;&lt;span style="font-family:symbol"&gt;&lt;span&gt;&lt;font size=3&gt;·&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;Click the .exe file to install the Client Application Connection files to the following location:&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri size=3&gt;C:\Microsoft Office Live Developer Resources\Client Application Connection Sample &lt;/font&gt;
&lt;h2&gt;&lt;em&gt;&lt;font face=Cambria color="#c0504d"&gt;Authenticate your Client Application Connection&lt;/font&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;With Windows Live ID for client applications, your application can access Windows Live ID sites and services, including Microsoft Office Live, using a customized authentication ticket. Let’s say that Dan Park signs in to his Microsoft Office Live account, and then opens your client application. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;The following steps demonstrate how you can authenticate Dan from your client application to allow access to Microsoft Office Live data.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;h5&gt;&lt;font face=Cambria color="#243f60" size=3&gt;Step 1. Authenticate Dan’s Windows Live ID account.&lt;/font&gt;&lt;/h5&gt;
&lt;p style="line-height:normal"&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;This sample uses the &lt;b&gt;IdentityManager &lt;/b&gt;class of Windows Live ID to create an &lt;b&gt;Identity&lt;/b&gt; object for the current user and then uses the &lt;b&gt;Authenticate&lt;/b&gt; method of this class to authenticate the user’s Windows Live ID account.&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;p style="text-indent:0.5in;line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;IdentityManager identityManager;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;identityManager = IdentityManager.CreateInstance(applicationId, &lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;                  &lt;/span&gt;applicationName);&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;Identity identity = identityManager.CreateIdentity();&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;if&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; (!identity.Authenticate())&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;{&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;     &lt;/span&gt;&lt;span style="color:blue"&gt;throw&lt;/span&gt; &lt;span style="color:blue"&gt;new&lt;/span&gt; &lt;span style="color:teal"&gt;ApplicationException&lt;/span&gt;(&lt;span style="color:maroon"&gt;&amp;quot;Unable to authenticate the &lt;/span&gt;&lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;&lt;span&gt;                         &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:maroon;font-family:'Courier New'"&gt;user’s Windows Live ID account.&amp;quot;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;);&lt;/span&gt; 
&lt;p&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;&lt;span&gt;       &lt;/span&gt;}&lt;/span&gt; 
&lt;h5&gt;&lt;font face=Cambria color="#243f60" size=3&gt;Step 2. Get the Microsoft Office Live settings needed to generate a Windows Live ID authentication ticket.&lt;/font&gt;&lt;/h5&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;The Client Application Connection code takes advantage of the Microsoft Office Live Discovery Web service to quickly discover the appropriate Live ID settings. First, it accesses the Discovery Web service.&lt;/font&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;Discovery discoSvc = &lt;span style="color:blue"&gt;new&lt;/span&gt; Discovery();&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;discoSvc.Url = &lt;span style="color:maroon"&gt;&amp;quot;https://apis.officelive.com/discoverywebsvc/discovery.asmx&amp;quot;&lt;/span&gt;;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; &lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Next, it gets the Windows Live ID settings for the Microsoft Office Live service.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="color:green"&gt;&lt;font face=Calibri size=3&gt; &lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;LiveIDSettings settings = discoSvc.GetLiveIDSettings();&lt;/span&gt; 
&lt;h5&gt;&lt;font face=Cambria color="#243f60" size=3&gt;Step 3. Request Dan’s current Windows Live ID authentication ticket for the Microsoft Office Live service.&lt;/font&gt;&lt;/h5&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;You can use Windows Live ID’s &lt;b&gt;GetTicket&lt;/b&gt; method to get the user’s authentication ticket information for the Microsoft Office Live service.&lt;/font&gt; 
&lt;h5&gt;&lt;span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New'"&gt;string&lt;/span&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;&lt;font color="#243f60"&gt; ticket = identity.GetTicket(settings.SiteName, settings.Policy, &lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:blue;line-height:115%;font-family:'Courier New'"&gt;false&lt;/span&gt;&lt;font color="#243f60"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;);&lt;/span&gt;&lt;/font&gt;&lt;/h5&gt;
&lt;h5&gt;&lt;font color="#243f60"&gt;&lt;font face=Cambria size=3&gt;Step 4. Authenticate Dan for Microsoft Office Live Web requests.&lt;/font&gt;&lt;/font&gt;&lt;/h5&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;The class&lt;b&gt; WindowsLiveAuthenticationModule,&lt;/b&gt;&lt;span&gt; included in this sample code, handles Windows Live ID authentication for Microsoft Office Live Web requests.&lt;/span&gt; This module implements an &lt;b&gt;IAuthenticationModule&lt;/b&gt; interface from the Microsoft System.Net namespace.&lt;/font&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;This sample code then creates and registers a new authentication module using the &lt;b&gt;Register &lt;/b&gt;method of the &lt;b&gt;AuthenticationManager&lt;/b&gt; class in the Microsoft System.Net namespace,&lt;span&gt;  &lt;/span&gt;passing the ticket obtained in step 3.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; &lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;WindowsLiveAuthenticationModule authModule;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;authModule = &lt;span style="color:blue"&gt;new&lt;/span&gt; WindowsLiveAuthenticationModule(ticket);&lt;/span&gt; 
&lt;p&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;&lt;span&gt;            &lt;/span&gt;AuthenticationManager.Register(authModule);&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;&lt;b&gt;&lt;span&gt;Authenticate&lt;/span&gt;&lt;/b&gt;&lt;span&gt; is the core method for the Client Application Connection sample custom authentication. The following are details of the actual process that triggers the Authenticate method:&lt;/span&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="text-indent:-0.25in;line-height:normal"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;1.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;When an Internet resource requests authentication, the System.Net &lt;b&gt;WebRequest.GetResponse&lt;/b&gt; method calls the &lt;b&gt;AuthenticationManager.Authenticate&lt;/b&gt; method. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="text-indent:-0.25in;line-height:normal"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;2.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;The &lt;b&gt;AuthenticationManager.Authenticate&lt;/b&gt; method calls each registered authentication module to find the first module that can respond to the authentication request.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="text-indent:-0.25in;line-height:normal"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;3.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;When a module responds, an &lt;b&gt;Authorization&lt;/b&gt; object is returned to the Web request. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt; &lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;This Authorization is the key you need to unlock Dan’s Microsoft Office Live data.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;h2&gt;&lt;em&gt;&lt;font face=Cambria color="#c0504d"&gt;Access Microsoft Office Live data&lt;/font&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;  
&lt;p&gt;&lt;font face=Calibri size=3&gt;The example in this code is designed to print the names of the documents in the user’s Microsoft Office Live document library if the user is authenticated. &lt;/font&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;You can use methods of the Discovery class in the Discovery Web service to determine the subscriptions that are associated with Dan Park and find a document library included in those subscriptions. The &lt;b&gt;GetSubscriptions&lt;/b&gt; method allows you to identify a Microsoft Office Live subscription that Dan owns. &lt;span&gt;The &lt;b&gt;GetResources&lt;/b&gt; method returns a list of resources, including document libraries, in the subscription. The code in this example selects the first document library it finds. &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;&lt;span&gt;The calls to the methods of the Discovery class invoke a &lt;b&gt;WindowsLiveAuthenticationModule&lt;/b&gt; to authenticate this Microsoft Office Live Web request&lt;/span&gt;:&lt;/font&gt;&lt;/font&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;discoSvc.UserAgent = discoSvc.UserAgent + &lt;span style="color:maroon"&gt;&amp;quot;;&amp;quot;&lt;/span&gt; + WindowsLiveAuthenticationModule.WindowsLiveClientHeader;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;discoSvc.Credentials = &lt;span style="color:blue"&gt;new&lt;/span&gt; NetworkCredential();&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;To access Windows Live ID sites and services, including Microsoft Office Live, you must find the URL of the Web Service Description Language (WSDL) file that describes the service. The service being used in this example is the SharePoint Lists Web service. In addition to adding this service as a Web reference, the example constructs a URL for it.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;string&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; listServiceUrl = userDocumentLibraryUrl + &lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New'"&gt;&lt;span&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;SharepointServicesPrefix&lt;span&gt;  &lt;/span&gt;+ &lt;span style="color:maroon"&gt;&amp;quot;Lists.asmx&amp;quot;&lt;/span&gt;;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; &lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;It then connects to the Lists Web service for Dan’s document library.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New'"&gt; &lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;Lists listsWebService = &lt;span style="color:blue"&gt;new&lt;/span&gt; Lists();&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;listsWebService.Url = listServiceUrl;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt; &lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Next, it invokes a WindowsLiveAuthenticationModule to authenticate this Microsoft Office Live Web request.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;           &lt;/span&gt;&lt;span style="color:green"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;listsWebService.UserAgent = listsWebService.UserAgent + &lt;span style="color:maroon"&gt;&amp;quot;;&amp;quot;&lt;/span&gt; + &lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;span&gt;          &lt;/span&gt;WindowsLiveAuthenticationModule.WindowsLiveClientHeader;&lt;/span&gt; 
&lt;p&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New'"&gt;listsWebService.Credentials = &lt;span style="color:blue"&gt;new&lt;/span&gt; NetworkCredential();&lt;/span&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;&lt;span&gt;                 &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;&lt;span&gt;The example then uses the Lists Web service to access and print the titles of all documents contained in Dan’s document library.&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;h2&gt;&lt;em&gt;&lt;font face=Cambria color="#c0504d"&gt;Connect your client applications&lt;/font&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;&lt;font face=Calibri size=3&gt;The Web services provided by Microsoft Office Live, Windows Live ID for client applications, and the Microsoft System.Net namespace combine to provide easy access to the information you need in order to provide a connection between a client application and Microsoft Office Live data. You can use the code in this sample to help incorporate this functionality in your application.&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri size=3&gt;&lt;/font&gt;  
&lt;p&gt;&lt;font face=Calibri size=3&gt;The Office Live Developer Platform team&lt;/font&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=8791053953718109947&amp;page=RSS%3a+The+Microsoft+Office+Live+Client+Application+Connection+code+sample&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=officeliveblog.spaces.live.com&amp;amp;GT1=officeliveblog"&gt;</description><comments>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!626.entry#comment</comments><guid isPermaLink="true">http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!626.entry</guid><pubDate>Wed, 28 Mar 2007 22:27:41 GMT</pubDate><slash:comments>3</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://officeliveblog.spaces.live.com/blog/cns!7A0018FE70A946FB!626/comments/feed.rss</wfw:commentRss><wfw:comment>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!626.entry#comment</wfw:comment><dcterms:modified>2007-05-21T17:18:26Z</dcterms:modified></item><item><title>The Microsoft Office Live Time Card sample code</title><link>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!561.entry</link><description>&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The Microsoft Office Live team has created another set of sample code to show off how you can use Microsoft Office Live Web services to extend the functionality of an Office Live business application. This newest sample, called Microsoft Office Live Time Card, extends Microsoft Office Live Project Manager (available with any Microsoft Office Live Premium or Microsoft Office Live Essentials subscription).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The Microsoft Office Live Time Card sample code shows a way to track time by project task.&lt;span&gt;  &lt;/span&gt;It uses Web services to look at a project you’ve already set up in Project Manager to populate a list of project tasks.&lt;span&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;We created this sample to provide an example of how you can model your own calls to the Windows SharePoint Services Web services hosted by Microsoft Office Live. These services give you quick and easy access to the lists in the various Microsoft Office Live business applications, such as the Project Tasks list used in this example. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;h3&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;Look at the end result&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The best way to understand the functionality is to install it on an Office Live business application. The download is an executable file that has everything you need, including a sample page containing a Page Viewer Web Part configured so that you can quickly see the results of the code. Here’s all you need to do to check it out:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;1.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri size=3&gt;To download the .exe file, go to the &lt;/font&gt;&lt;/font&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=848700e6-0c10-4d6c-9f02-dd2650f63655&amp;amp;DisplayLang=en"&gt;&lt;u&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Microsoft Download Center&lt;/font&gt;&lt;/u&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;. &lt;span&gt; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;2.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3&gt;&lt;font face=Calibri&gt;Click the .exe file to install the Time Card files to the following location:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;&lt;span&gt; &lt;/span&gt;C:\Microsoft Office Live Developer Resources\Time Card Sample&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;3.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;Upload the files to a document library in a business application. For example, you can put the files in the &lt;b&gt;Document Library&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt; of Document Manager. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style="text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;4.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;In the &lt;b&gt;Document Library&lt;/b&gt;, click &lt;b&gt;samplepage&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p style="text-indent:-0.25in"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face=Calibri size=3&gt;5.&lt;/font&gt;&lt;span style="font:7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;In the &lt;b&gt;TimeCard&lt;/b&gt; list creation dialog boxes, click &lt;b&gt;OK&lt;/b&gt;&lt;/font&gt;&lt;font size=3&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;This sample Web page opens with a Page Viewer Web Part configured to display our version of a time card. This time card allows the user to pick one project task and then &lt;b&gt;Punch In&lt;/b&gt; to track the time he is currently spending on that task. The total time spent on each task is then stored, so that the next time he opens the time card the time tracked so far on any task appears in the &lt;b&gt;Time spent on task&lt;/b&gt; field. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;em&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;Web part configured as a time card&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt; 
&lt;p&gt;&lt;img style="width:674px;height:181px" height=43 src="http://byfiles.storage.msn.com/x1pMvt0I80jTgRgTtErIq_spP58rSY2BF7QQl5R_KaF-1k5lPklHU_IQXqjH1OYREd3Sqzwg4IwLfPM6c_rOrqMWJgDpvvn1FsaLCZpqWkj4iM" width=164 border=0&gt; 
&lt;p&gt;&lt;em&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;
&lt;h3&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;How it works&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The tasktime and timecard JScript files provide the functions and methods needed to create and use our time card.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;b&gt;&lt;font size=2&gt;&lt;font color="#404040"&gt;&lt;font face=Cambria&gt;Build&lt;span&gt;  &lt;/span&gt;and manage the dropdown list of tasks&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The getTasks function in timecard.js uses a Web service call to collect the tasks in the Project Tasks list of Project Manager, to populate the &lt;b&gt;Project Tasks&lt;/b&gt; field.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;em&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;The Time Card Project Tasks&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt; 
&lt;p&gt;&lt;img style="width:593px;height:188px" height=43 src="http://byfiles.storage.msn.com/x1pMvt0I80jTgRgTtErIq_spI8Ci-gwB-0xXLhg7aPqwaF0xFFoaI75tWOvnaEalH7olDNjgDCI3wcA7KQvENFh2b6PZgVI1AZV7LichOHafj4" width=164 border=0&gt; 
&lt;p&gt;&lt;em&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;We’ve already done the work of putting JScript functions together to package up the SOAP requests you need to talk to Office Live Web services. You can use these same functions from the common Jscript file &lt;span&gt; &lt;/span&gt;(olsharedlibv1.js) to jump start your development work.&lt;span&gt;  &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;TaskTimer is the function defined in tasktime.js. If the user switches the task in the time card, the switchTask method of the TaskTimer function is called. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;b&gt;&lt;font size=2&gt;&lt;font color="#404040"&gt;&lt;font face=Cambria&gt;Capturing the duration of a task&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt; 
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The startTimer and stopTimer functions triggered by the &lt;b&gt;Punch In&lt;/b&gt; button cause the timer to start and stop for the current task. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style="line-height:normal"&gt;&lt;span&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;&lt;b&gt;&lt;font size=2&gt;&lt;font color="#404040"&gt;&lt;font face=Cambria&gt;Storing and retrieving the recorded time&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;When you installed this sample code, an Office Live list named TimeCard was created to store time record items. Each time that an amount of time is recorded for a particular task, an item is added to this list. This time record item is created when the user clicks &lt;b&gt;Punch in&lt;/b&gt; and modified when the user clicks &lt;b&gt;Punch out&lt;/b&gt;. The duration is then calculated by taking the difference between the created and modified time of the list item. Finally, the total duration for a task is calculated by summing the duration of all list items associated with a particular task.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;We wouldn’t generally allow an end user to see this list, as it’s a back end item. The list created by this sample code can be viewed in Project Manager. On the actions bar, click the arrow next to &lt;b&gt;More&lt;/b&gt;, and then click &lt;b&gt;TimeCard&lt;/b&gt;. &lt;span&gt; &lt;/span&gt;The list is created and initialized by the createTimerList and initializeTimerList functions. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;h3&gt;&lt;font size=3&gt;&lt;font color="#4f81bd"&gt;&lt;font face=Cambria&gt;Your turn&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt;
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;This is just a quick example of the type of services you can add to your client’s Office Live Premium or Office Live Essentials subscription. The Web services provided by Windows SharePoint Services and the data stored in Office Live combine to provide functionality that can streamline your client’s day-to-day processes. The common JScript functions help you accomplish this with minimal effort.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri color="#000000" size=3&gt;To learn more about the Web services offered by Windows SharePoint Services, download the &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms441339.aspx"&gt;&lt;u&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Windows SharePoint Services 3.0 SDK&lt;/font&gt;&lt;/u&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri color="#000000" size=3&gt;To learn more about which Windows SharePoint Services Web services are supported by Microsoft Office Live, read the Microsoft &lt;/font&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa973401.aspx"&gt;&lt;u&gt;&lt;font face="Times New Roman" color="#0033cc" size=3&gt;Office Live Developer’s Guide&lt;/font&gt;&lt;/u&gt;&lt;/a&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face=Calibri color="#000000" size=3&gt; &lt;/font&gt; 
&lt;p&gt;&lt;font size=3&gt;&lt;font color="#000000"&gt;&lt;font face=Calibri&gt;The Office Live Developer Platform team&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;div&gt;&lt;table cellspacing="0" border="0"&gt;&lt;tr height="8"&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;p&gt;&lt;a href="http://byfiles.storage.live.com&amp;#47;y1p5U3l0lpxG4aRTvv_jNNG0odryor0vmU73pbYziyVGupYRwZVfye6Hg"&gt;&lt;img src="http://storage.live.com&amp;#47;items&amp;#47;7A0018FE70A946FB&amp;#33;563&amp;#58;thumbnail" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="15"&gt;&lt;/td&gt;&lt;td valign="top"&gt;&lt;p&gt;&lt;a href="http://byfiles.storage.live.com&amp;#47;y1peekmyndUulPWG_QXrmRQEuAFJYAb6ZZG7TT--SZ5_SB5ApyW1Mnn5Q"&gt;&lt;img src="http://storage.live.com&amp;#47;items&amp;#47;7A0018FE70A946FB&amp;#33;562&amp;#58;thumbnail" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="15"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=8791053953718109947&amp;page=RSS%3a+The+Microsoft+Office+Live+Time+Card+sample+code&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=officeliveblog.spaces.live.com&amp;amp;GT1=officeliveblog"&gt;</description><comments>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!561.entry#comment</comments><guid isPermaLink="true">http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!561.entry</guid><pubDate>Thu, 22 Feb 2007 05:35:12 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://officeliveblog.spaces.live.com/blog/cns!7A0018FE70A946FB!561/comments/feed.rss</wfw:commentRss><wfw:comment>http://officeliveblog.spaces.live.com/Blog/cns!7A0018FE70A946FB!561.entry#comment</wfw:comment><dcterms:modified>2007-02-22T05:59:18Z</dcterms:modified></item></channel></rss>