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?
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 FPRPCstring result = dm.UploadFileViaRPC(NewOfficeLiveFileURLDoc, "C:\\LocalFile.doc");result = dm.DownloadFileViaRPC(OfficeLiveFileURL, "c:\\LocalFile.doc");
//Use DAVresult = dm.UploadFileViaWebDAV(NewOfficeLiveFileURLDoc,"C:\\LocalFile.doc");result = dm.DownloadFileViaWebDAV(OfficeLiveFileURL, "C:\\LocalFile.doc");