Cannot Add Custom View Engine - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Cannot Add Custom View Engine

  • Cannot Add Custom View Engine
  • When trying to add a custom view engine in Global.asax, I am getting the following exception stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.] System.Linq.<SelectManyIterator>d__14`2.MoveNext() +311 System.Linq.Buffer`1..ctor(IEnumerable`1 source) +487 System.Linq.Enumerable.ToArray(IEnumerable`1 source) +102 Telerik.Sitefinity.Frontend.FilesMonitoring.LayoutFileManager.CreateTemplateAndFileData(String fileName, String filePath, String packageName, FileMonitorDataManager fileMonitorDataManager, FileData fileData) +234 Telerik.Sitefinity.Frontend.FilesMonitoring.LayoutFileManager.FileAdded(String fileName, String filePath, String packageName) +587 Telerik.Sitefinity.Services.SystemManager.RunWithElevatedPrivilege(RunWithElevatedPrivilegeDelegate delegateToRun, Object[] parameters, String urlRequest) +404 Telerik.Sitefinity.Frontend.FilesMonitoring.FileMonitor.ProcessDirecotryFiles(DirectoryInfo dirInfo) +152 Telerik.Sitefinity.Frontend.FilesMonitoring.FileMonitor.Start(IList`1 directoriesInfo) +373 Telerik.Sitefinity.Frontend.FilesMonitoring.FileMonitoringInitializer.Initialize() +556 Telerik.Sitefinity.Frontend.FrontendModule.Bootstrapper_Initialized(Object sender, ExecutedEventArgs e) +81 System.EventHandler`1.Invoke(Object sender, TEventArgs e) +0 Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +889 Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +399 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +529 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +303 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +403 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +474 [HttpException (0x80004005): Object reference not set to an instance of an object.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618692 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458309

     

    This view engine works fine in our traditional, non-CMS MVC apps, but Sitefinity appears to be failing at loading it and won't say why.

     

    Can anyone help me understand what is going on here and perhaps how I can load up our view engine?

  • Hello Clayton,

    We have replied in the support thread. We can continue the communication there and after that feel free to share the information with the community.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • Hello,

    The issue is caused by several default properties that should be defined and not empty when registering the view engine. More information can be found in the bellow KB article:
    http://www.sitefinity.com/developer-network/knowledge-base/details/object-reference-error-when-adding-new-view-engine

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items