call to AddTemplateFile failing with FileNotFoundException when attempting to restore an aspx file

Regular Visitor

We are using the Sharepoint API SP.FileCollection.addTemplateFile Method to restore pages that have been backed up previously.  Occasionally, this fails and returns a FileNotFoundException.  I've been trying to track down what this error is pointing towards.

 

Here is the request:

And the response:

<?xml version="1.0" encoding="utf-8"?>
    <m:code>-2147024894, System.IO.FileNotFoundException</m:code>
    <m:message xml:lang="en-US">File Not Found.</m:message>
</m:error>
 
Possible Reasons that I can think of:
  • The site page collection does not exist.
  • The parameter, templateFileType is not correct
  • The file being restored is not a ghosted file.
 
Any ideas as to why the FileNotFoundException?
 
Thanks 
0 Replies