public static SPFile UploadListTemplate(string siteUrl, string templatePath)
{
using (SPSite site = new SPSite(siteUrl))
{
SPDocumentLibrary templates = (SPDocumentLibrary)site.GetCatalog(SPListTemplateType.
ListTemplateCatalog);
System.IO.FileInfo fileInfo = new System.IO.FileInfo(templatePath);
byte[] bytes = System.IO.File.ReadAllBytes(fileInfo.FullName);
return templates.RootFolder.Files.Add(fileInfo.Name, bytes);
}
}

![[FIX] BizTalk Server 2010, 2013, 2013 R2 & 2016 errors “Class not registered (WinMgmt)” or “Access denied”](https://blogit.create.pt/wp-content/uploads/2018/07/access-black-and-white-blur-270514-218x150.jpg)














