If you’re working with an InfoPath form and are trying to display it as a web enabled form but are getting errors saying the form template failed to load, it may just be due to the manifest for the XSN not containing the relative URL base.
For the following ULS errors:
The form template failed to load. (User: …., Type: NullReferenceException, Exception Message: Object reference not set to an instance of an object.)
Unhandled exception when rendering form System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.
UrlIsSameFileOrSamePath(String absoluteFileUrl, String baseFileOrFolderUrl)….
These are due to the XSN not having the base URL defined, which can be resolved by updating the manifest.xml with the following element: