Uploading and Downloading documents from a Office Live Business Application using DAV/FPRPC

Published 21 August 07 09:01 PM | Rohit Puri 

It’s somewhat difficult to work with Front Page RPCs.  We’ve heard this from folks, and I recently solved it for myself in a client app that uploads and downloads files from document libraries sitting in a custom business application in Microsoft Office Live. 

I wrapped up the FPRPC and DAV code in a class library for use in any client application. Figured I should share this to save you some effort.

This Sample allows working with documents in a Office Live Business Application using FPRPC or DAV.

Note that this has not gone through testing and has no guarantees etc.

How to use the sample?

  • Download Document Handler (FPRPC/DAV) Sample and extract all files.
  • Re-add the reference to Microsoft.Windows.Live.Id
  • Build the project.
  • Output is a dll DocumentHandler.dll
  • In your client application reference this and use it as follows.

    string OfficeLiveFileURL = "https://mysitecom.officelive.com/Documents/documents/ClickToCall.doc"
    string NewOfficeLiveFileURLDoc = https://mysitecom.officelive.com/Documents/documents/NewClickToCallDoc.doc

    DocumentHandler.DocumentManager dm = new DocumentHandler.DocumentManager();

    //BusinessName is your Business Application Name in

    //Office Live that you want to use.
    dm.BusinessName = "Document Manager"
    dm.UserName = administrator@northwindinn.com

    //This brings up the liveID sign on box to sign you in.
    dm.SignIn();

    //Use FPRPC
    string result = dm.UploadFileViaRPC(NewOfficeLiveFileURLDoc, "C:\\LocalFile.doc");
    result = dm.DownloadFileViaRPC(OfficeLiveFileURL, "c:\\LocalFile.doc");

    //Use DAV
    result = dm.UploadFileViaWebDAV(NewOfficeLiveFileURLDoc,
    "C:\\LocalFile.doc");
    result = dm.DownloadFileViaWebDAV(OfficeLiveFileURL, "C:\\LocalFile.doc");

  • Build and Run.

Comments

# MSDN Blog Postings said on August 21, 2007 4:44 PM:

PingBack from http://msdnrss.thecoderblogs.com/2007/08/21/uploading-and-downloading-documents-from-a-office-live-business-application-using-davfprpc/

# mattaniah said on April 17, 2008 2:52 PM:

WOW!  However, I dont need the Live ID code.  How do I pass it the windows credentials of the user?

Anonymous comments are disabled

Search

Go

This Blog

Tags

No tags have been created or used yet.

Syndication

Page view tracker