Sladescross's Blog

Blogging about Sharepoint related stuff

Remote Access Alternatives Using SharePoint January 29, 2012

RPC examples.

Trace SharePoint Designer

Interesting problem with WebDav calls not working because IIS7 had web dav publishing enabled.

GetUsage BLOB RPC call.

(1) Copy.asmx file upload.

Byte array can have contiguous memory allocation problems on the server.

(2) WebDav (WebClient) file upload

No metadata can be uploaded.

(3) RPC (FrontPage) file upload

However, it does not support sending any metadata long with the file content. This can be a major problem if the document library has multiple content types, so the new file will be put into the document library with the default content type. Another big issue is if the default content type has required fields. The file will remain checked out until the fields are populated. This prevents other users from seeing the document or from being returned in any searches.  It is a great solution if you are just bulk migrating data from an external data store to SharePoint. You more than likely will have to do extra work afterwards. Adding metadata after uploading will also cause the creation of extra versions of the document being created unnecessarily. The fact that it does not use the soap protocol but straight http makes it more scalable than the copy web service. Unfortunately, it still suffers from the fact that it uses a byte array to upload the file. So sooner or later you will run into “out of memory “ exceptions.  So how can I create a folder before using WebDav?  You can use the lists web service to accomplish this:


WebClient and SharePoint Integration December 22, 2011

Filed under: OpenControl,WebClient — sladescross @ 10:23 pm

Implementing a Custom OpenControl Solution
Generally, you have two options to address the Web Client shortcomings. You can wait until Microsoft provides an updated Web Client version, or you can implement a custom OpenControl solution that can deal with the current situation. Implementing a custom OpenControl is not a trivial task, but it eliminates the need for Office on your workstations, it enables you to handle the New command in addition to the Edit in command meaningfully, and it allows you to address situations when the Web Client fails.
If any of these issues are compelling to you, take a look at the AppStart source code included in the companion material. It shows you how to expose the OpenControl COM interfaces in a Microsoft .NET Framework assembly, which the SharePoint JavaScript code can call. The AppStart source code also demonstrates one possible way to check file accessibility and download a file to the local computer via HTTP if direct access through WebDAV is not possible. Finally, the AppStart source code responds to the New command by downloading the template associated with the content type to the local computer so that the user can start working on the document. The worksheets Text Content Type.pdf and Adobe Reader Support.pdf outline how to deploy this OpenControl solution.


Get every new post delivered to your Inbox.

Join 63 other followers