I know how to upload the published xsn InfoPath form, but when I try to open it, the form can't find its code behind assembly dll. Does anyone know how to add that? I know it gets put in hive 14 folder at FT-01-\version #.
Do I have to manually find that folder and place the dll in there? Or is there a way I can upload the dll along with the form?
Here is my code so far:
FormsService localFormsService;
SPFarm localFarm = SPFarm.Local;
try
{
FormTemplate temp = new FormTemplate();
localFormsService = localFarm.Services.GetValue<FormsService>(FormsService.ServiceName);
localFormsService.FormTemplates.UpgradeFormTemplate(@"C:\PublishedForms\My Form.xsn", FormTemplateCollection.UpgradeType.Overwrite);
SPWebApplication webApplication = SPContext.Current.Site.WebApplication;
SPSiteCollection siteCollections = webApplication.Sites;
FormTemplateCollection fCol = localFormsService.FormTemplates;
foreach (FormTemplate f in fCol)
{
if (f.Name == "My Form")
f.Activate(siteCollections[0]);
}
}
catch (Exception ex) { }
Here is the error I get when I try to open the form from my site collection.
"Could not load file or assembly 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\FT-01-6c9edb80-4be2-73f2-3ef4-bb647484b323\MyForm.dll' or one of its dependencies.

