Progmatically creating documents Kentico 9
<p>I've to create a new document in the back end but can not find any useful information on how to do this in Kentico 9.</p>

<p>So far I've got </p>

<pre><code> UserInfo user = UserInfoProvider.GetUserInfo("administrator");

// Creates a tree provider instance using administrator context
TreeProvider tree = new TreeProvider(user);

// Prepare parameters
string siteName = CMS.SiteProvider.SiteContext.CurrentSiteName;
string aliasPath = "/News";
string culture = "en-GB";
bool combineWithDefaultCulture = false;
string classNames = TreeProvider.ALL_CLASSNAMES;
string where = null;
string orderBy = null;
int maxRelativeLevel = -1;
bool selectOnlyPublished = false;
string columns = null;

// Get the example folder
TreeNode parentNode = DocumentHelper.GetDocument(siteName, aliasPath, culture, combineWithDefaultCulture, classNames, where, orderBy, maxRelativeLevel, selectOnlyPublished, columns, tree);

if (parentNode != null)
{
  // Create a new node
  TreeNode node = TreeNode.New("CMS.News", tree);

  // Set the required document properties
  node.DocumentName = "Test";
  node.DocumentCulture = "en-GB";

  // Insert the document
  try
  {
    DocumentHelper.InsertDocument(node, parentNode, tree);
  }
  catch (Exception ex)
  {
    EventLogProvider.LogException("Create New News", "EXCEPTION", ex);
  }
}
</code></pre>

<p>This however throws an error:</p>

<pre><code>Message: [WebFarmTaskManager.CanCreateTask]: Task type 'DICTIONARYCOMMAND' is not supported. The task needs to be registered with WebFarmHelper.RegisterTask method.
</code></pre>

<p>Has anyone had experience with doing this in Kentico <strong><em>9</em></strong>?</p>