Error: The value cannot be an empty string. Parameter name: xmlFile

You may get the following error when building publishing sites hierarchy: “Provisioning did not succeed. Details: Failed to completely create the subsite ‘http://siteurl’. OriginalException: Invalid value. The value cannot be an empty string. Parameter name: xmlFile” Here’s the solution.

Look for definition of site that gave this error and open its template file. You should see there something like this.


<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:ows="Microsoft SharePoint">
  <Template Name="Magazines" ID="10007">
    <Configuration ID="0"
                   Title="Magazines"
                   DisplayCategory="Publishing"
                   Hidden="FALSE"
                   ImageUrl="/_layouts/1033/images/BasicWCMPreview.png"
                   Description="Our magazines site."
                   ProvisionAssembly="Microsoft.SharePoint.Publishing,
Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c"
                   ProvisionClass="Microsoft.SharePoint.Publishing.
PortalProvisioningProvider"                   
                   SubWebOnly="TRUE"
                   >
    </Configuration>
  </Template>
</Templates>

Remove ProvisionAssembly and ProvisionClass attributes from definition, deploy package again and create site again.

The reason is simple – publishing provisioning mechanism expects that you also set attribute for XML-file location that defines subsite tree for current site. If you don’t have subsites tree then you don’t need to use publishing provisioning engine.


Leave a Reply

Your email address will not be published. Required fields are marked *