Visual Studio 2010 gives me this error,
urlOfFile - Parameter name: Specified value is not supported for the urlOfFile parameter.
by the folowing line of code.
// Specify a document template.
templateDocumentCType.DocumentTemplate = documentTemplate;
The code is taken direcly from msdn