| OL Blog 的个人资料The Microsoft Office Liv...日志列表 | 帮助 |
|
3月28日 The Microsoft Office Live Client Application Connection code sampleThe 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. This code sample takes advantage of the Microsoft Office Live Discovery Web service, Windows Live ID for client applications , and the authentication services provided in the Microsoft System.Net namespace. 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. 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. Download the sampleClient 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. To download the .exe file, go to the Microsoft Download Center. · Click the .exe file to install the Client Application Connection files to the following location: C:\Microsoft Office Live Developer Resources\Client Application Connection Sample Authenticate your Client Application ConnectionWith 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. The following steps demonstrate how you can authenticate Dan from your client application to allow access to Microsoft Office Live data. Step 1. Authenticate Dan’s Windows Live ID account.This sample uses the IdentityManager class of Windows Live ID to create an Identity object for the current user and then uses the Authenticate method of this class to authenticate the user’s Windows Live ID account.
IdentityManager identityManager; identityManager = IdentityManager.CreateInstance(applicationId, applicationName); Identity identity = identityManager.CreateIdentity(); if (!identity.Authenticate()) { throw new ApplicationException("Unable to authenticate the user’s Windows Live ID account."); } Step 2. Get the Microsoft Office Live settings needed to generate a Windows Live ID authentication ticket.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. Discovery discoSvc = new Discovery(); discoSvc.Url = "https://apis.officelive.com/discoverywebsvc/discovery.asmx";
Next, it gets the Windows Live ID settings for the Microsoft Office Live service.
LiveIDSettings settings = discoSvc.GetLiveIDSettings(); Step 3. Request Dan’s current Windows Live ID authentication ticket for the Microsoft Office Live service.You can use Windows Live ID’s GetTicket method to get the user’s authentication ticket information for the Microsoft Office Live service. string ticket = identity.GetTicket(settings.SiteName, settings.Policy, false);Step 4. Authenticate Dan for Microsoft Office Live Web requests.The class WindowsLiveAuthenticationModule, included in this sample code, handles Windows Live ID authentication for Microsoft Office Live Web requests. This module implements an IAuthenticationModule interface from the Microsoft System.Net namespace. This sample code then creates and registers a new authentication module using the Register method of the AuthenticationManager class in the Microsoft System.Net namespace, passing the ticket obtained in step 3.
WindowsLiveAuthenticationModule authModule; authModule = new WindowsLiveAuthenticationModule(ticket); AuthenticationManager.Register(authModule); Authenticate 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: 1. When an Internet resource requests authentication, the System.Net WebRequest.GetResponse method calls the AuthenticationManager.Authenticate method. 2. The AuthenticationManager.Authenticate method calls each registered authentication module to find the first module that can respond to the authentication request. 3. When a module responds, an Authorization object is returned to the Web request.
This Authorization is the key you need to unlock Dan’s Microsoft Office Live data. Access Microsoft Office Live data
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. 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 GetSubscriptions method allows you to identify a Microsoft Office Live subscription that Dan owns. The GetResources method returns a list of resources, including document libraries, in the subscription. The code in this example selects the first document library it finds. The calls to the methods of the Discovery class invoke a WindowsLiveAuthenticationModule to authenticate this Microsoft Office Live Web request: discoSvc.UserAgent = discoSvc.UserAgent + ";" + WindowsLiveAuthenticationModule.WindowsLiveClientHeader; discoSvc.Credentials = new NetworkCredential(); 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. string listServiceUrl = userDocumentLibraryUrl + SharepointServicesPrefix + "Lists.asmx";
It then connects to the Lists Web service for Dan’s document library.
Lists listsWebService = new Lists(); listsWebService.Url = listServiceUrl;
Next, it invokes a WindowsLiveAuthenticationModule to authenticate this Microsoft Office Live Web request.
listsWebService.UserAgent = listsWebService.UserAgent + ";" + WindowsLiveAuthenticationModule.WindowsLiveClientHeader; listsWebService.Credentials = new NetworkCredential(); The example then uses the Lists Web service to access and print the titles of all documents contained in Dan’s document library. Connect your client applicationsThe 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.
The Office Live Developer Platform team 3月23日 Give your search-engine rankings a liftSo, you’ve put a lot of work into your Web site, but you’re frustrated that the search engines don’t seem to care. When you plug a relevant keyword into a search box, your site is nowhere to be seen --- at least on the first page of results. What’s an aspiring entrepreneur to do? There’s plenty you can do, at a relatively low cost. But, first, know that search-engine rankings are fiercely competitive today, and some of the factors involved in rankings are beyond your control. What you can control is the quality of content on your site and the number and caliber of links to it. Yes, having content that makes your site worth a link --- be it smart how-to articles or free tools and downloads --- is important. For more on this point, read How to get links to your site. But you can also improve your rankings by getting links to it from key “authority” Web sites and blogs, such as professional associations and the like, that serve your target audience. Catherine Seda is an Internet marketing strategist and author of a new book, “How to Win Sales & Influence Spiders.” She recently compiled for Microsoft Office Live her top five spots to get quality links: 1. Professional or trade associations. It’s probably the easiest link you can get, Seda says, because a link from the association’s site to yours is likely included in your membership fee. If not, submit your URL and ask that a link be added. Or write an article for the association site, or even pay for an ad, if necessary. “It’s worth the money,” Seda says, because the association site is certain to be rich in the content your audience seeks. (Need a directory of professional associations? See these pages on Yahoo or Google.) 2. Other Web sites in your niche. Rather than merely trading links with as many Web sites as you can muster, seek out quality sites with content similar to yours. Contact site owners and offer to write articles for those sites. In any articles, include a byline and link to your bio. Search-engine spiders will notice the links and so will prospects. 3. Blogs in your niche. Use blog engines such as Icerocket and Technorati to find blogs related to your business. Search for those with rich content and worthwhile discussions. Post a helpful comment on someone’s blog; oftentimes, you’ll be given a link back to your site. Don’t pitch your business; simply share a relevant tip or tool in your post. Hollow “I love your blog!” posts likely will smell like spam and be deleted. 4. Social networking sites. Sites such as YouTube, Flickr, Digg, and MySpace may sound unrelated to your business, but don’t dismiss them. Most allow you to create a profile page where you can build your brand and link to your site. Social networking sites work best if you’re targeting a younger demographic. Still, they are immensely popular, and could drive spiders and prospects to your sites. 5. Press release services. Newswires such as PRWeb and Newsforce can help you get your message out via a press release. For a fee, they can optimize your press releases with good keywords for higher visibility on news engines such as Yahoo! News and, in turn, on general search engines. Expect to spend $70 or more per release, but it may be worth it. Focus on these efforts, Seda says, and then take a look at your rankings. In a future post, I will talk about what sites NOT to get links from. Monte Enbysk 3月13日 Live Search on office live subscriptionsInterested in Customized Site Searches?
Are you a small business owner who sells gourmet coffee in your website? Here is a customized site search that you can add to your site such that your customers can search and learn about the different kinds of coffee from all over the world. You can customize the search to look for information only from certain sites - sites that your customers will be in interested in! It's cool interface would make it fit neatly anywhere on your website. And it's free!
Here are the steps to add a customized search to your Microsoft Office Live web site. 1. Go to http://search.live.com/siteowner 2. Click the “Get Started” button under the “Advanced Search Box” section 3. You will be taken to the following screen
4. Create a name for your customized search like “All about fruits” or “California Wines” and add a set of web sites from which you want to perform the searches.
5. After you fill in the sites, click the Next button. It should take you to the following screen.
6. Copy the contents inside the text box (HTML snippet) and save it in a notepad as “CustomSearch.htm” (Note: Notepad saves the file default with .txt extension. Make sure you change the option to All Files and save with a .htm extension) 7. Now log into your Office Live web site account and go to Document Gallery. 8. Upload the file “CustomSearch.htm” that you just created in Step 6. 9. Open the Site Designer and create a new “General” web page. Let’s name it as “Search.aspx”. 10. Drag and drop a HTML Module into this newly created web page.
11. It brings open the HTML Module with an editor as follows.
12. Copy and Paste the following code into the editor and click OK. <IFRAME src="http://yoursitename/Documents/customsearch.htm" width="800" height="800" frameborder="0" scrolling=no> [Your browser does not support frames or is currently configured not to display frames. However,you can <A href="http://yoursitename/Documents/customsearch.htm" target="new"> --> Click Here</A></IFRAME>
NOTE: Replace the text “yoursitename” with your domain like “joe-fruits.com” or “bob-wines.net” 13. Save the page and go to the following page in the browser: http://yoursitename/search.aspx and voila! you have it!
Venkata Ramasubramaniam 3月2日 Domain RedelegationHey folks, For those of you who already have a domain name, good news! Microsoft Office Live has begun offering domain redelegation. What is domain redelegation? It’s a way to use your existing domain name (like www.adventure-works.com) with Microsoft Office Live. Domain redelegation lets you tell your current domain registrar (the company responsible for your domain name) to associate your domain name with your new Microsoft Office Live Web site hosting and e-mail services. Unlike domain transfers, which move your domain name from one registrar to another, your domain name stays with your current domain registrar. This translates many fewer hurdles for our customers who bring their own domain names. As a comparison, domain transfers can take a week or more to complete, but redelegation almost always takes effect within 48 hours (usually, within 24 hours). The redelegation process should only take about half an hour of your time. To further simplify things, we have provided registrar-specific instructions to help guide you through the process here for some of the larger domain registrars. Currently, we support domain redelegation with the following domain extensions: .com, .org, .net, .co.uk, .de, and .eu. On a related note, we will stop offering domain name transfers. The reason for this shift is that the domain transfer process has proven to be a difficult one for our customers. Domain redelegation, by comparison, is MUCH easier and almost always takes effect within 48 hours (usually within 24 hours). The Microsoft Office Live Team |
|
|