Note: SharePoint Designer uses a call to /_vti_bin/shtml.dll/_vti_rpc to find out the version number
FrontPage SharePoint RPC API Call April 23, 2012
Frontpage/SharePoint Remote Procedure Call API
From there I added a new property matching the existing “vti_” pattern, using the property name we found in the Open Service method’s response:
The third RPC call (the one to author.dll) is the one we’re most interested in: it calls the Open Service FPRPC method. The response we get is almost 3kb of ALMOST-html garble (thanks again, Vermeer). Hidden in the response is a familiar attribute with a new name – vti_disablewebdesignfeatures2 with a value of wdfopensite:
Remote Access Alternatives Using SharePoint January 29, 2012
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:
Content Deployment API and Moving Document Library July 23, 2011
An example of code for copying a list and list items though no security. No content types.
Supplement the content deployment api by copying the security data as well.
Security defect with the content deployment API.
Here’s the code I ended up with to copy the
contents of the Documents list in one sub site to the Documents list in another
sub site within the same web application:
Including a delete at 0 loop technique.
RPC technique for moving document library items.
Sharepoint content deployment API.
Details of Sharepoint content deployment API for export.
stsadm for content migration.
Import to a different subweb.
Method 1 – all orphaned objects should be imported into the same sub web
This method will only work if all items need to be added to the same sub web. E.g. if you have exported a couple of lists and document libraries (even from different source webs) and now would like to import them into the same sub web.
SPImportSettings settings = new SPImportSettings();
settings.SiteUrl = “http://localhost:2001″;
settings.WebUrl = “http://localhost:2001/MyDestWeb”;
settings.FileLocation = @”c:\export”;
settings.FileCompression = false;
settings.RetainObjectIdentity = false;
SPImport import = new SPImport(settings);
There are two important settings that are required to get this working:
WebUrl – this property defines the web that will be used as the new parent for all orphaned objects in the export package. This method (e.g.) cannot be used if the package contains orphaned documents as a web cannot be the parent of a document. The parent of a document needs to be a list or a folder.
RetainObjectIdentity – this defines whether to preserve the object identity during import or whether not to preserve the identity. If the value is false the objects will get a new generated Guid during import and it will be possible to assign a new parent to the imported orphaned objects.
Name GUID conflict with RetainObjectIdentity
2) Ensure that sufficient disk space is available
This sounds like a simple prerequesit but it isn’t. Content deployment uses different places to store the extracted and compressed files. The compressed files are stored in the location you can configure on the “Content Deployment Settings” page in the “Temporary Files” row.
But before export creates the compressed files it first exports everything into a temporary directory. And this directory is placed inside the directory which is configured in the TMP environment variable of the user the Windows SharePoint Services Timer service (OWSTIMER.EXE) runs on (usually refered to as farm credentials). Per default this variable has the following value: “%USERPROFILE%\Local Settings\Temp” which is usually on your system drive.
Impact: So per default MOSS content deployment requires the disk space for the uncompressed exported files on your system drive!
How to resolve: The easiest way to resolve this is to logon to the machine with the farm credentials and adjust the TMP variable to point to a different location. Afterwards you would need to restart the OWSTIMER service.
Sharepoint 2010 can use snapshots for content deployment.
Comprehensive example including versioning and security.
SPExportSettings exportSettings = new SPExportSettings();
// Turn on extra output for testing
exportSettings.CommandLineVerbose = true;
// The name of the file targeted by the export
exportSettings.BaseFileName = “export.cmp”;
// The directory on the file system in which
// to put the exported package
exportSettings.FileLocation = @”%temp%”;
// If the file exists, overwrite it
exportSettings.OverwriteExistingDataFile = true;
// Export all security settings; change this if needed
exportSettings.IncludeSecurity = SPIncludeSecurity.All;
// The URL of the site being exported
exportSettings.SiteUrl = sourceUrl;
// The last major and minor versions
exportSettings.IncludeVersions = SPIncludeVersions.LastMajorAndMinor;
// Compress the exported file
exportSettings.FileCompression = true;
// Create a new export object with the correct settings
SPExport export = new SPExport(exportSettings);
Calling stsadm from Powershell.