Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   CompiledRazorTemplates.Dynamic.RazorEngine_55e0c96adb57410589a57e9c1e36ab01.Execute() +2382
   RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) +211
   RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) +88
   RazorEngine.Templating.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) +99
   RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) +68
   FrameworkLibrary.ParserHelper.RunOrCompileRazorCode(String tag, String code, Object obj, Boolean compileRazor) in C:\SourceControl\ahs-schools\FrameworkLibrary\Helpers\ParserHelper.cs:334
   FrameworkLibrary.ParserHelper.ParseData(String data, Object obj, Boolean compileRazor) in C:\SourceControl\ahs-schools\FrameworkLibrary\Helpers\ParserHelper.cs:291
   FrameworkLibrary.MediaDetailsMapper.ParseSpecialTags(IMediaDetail mediaDetail, String propertyName, Int32 previousCount, Object passToParser, Boolean includeFieldWrapper) in C:\SourceControl\ahs-schools\FrameworkLibrary\DataMappers\MediaDetailsMapper.cs:1461
   FrameworkLibrary.MediaDetailsMapper.ParseWithTemplate(IMediaDetail mediaDetail) in C:\SourceControl\ahs-schools\FrameworkLibrary\DataMappers\MediaDetailsMapper.cs:1226
   WebApplication.Views.PageTypes.Static.Page_Init(Object sender, EventArgs e) +124
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnInit(EventArgs e) +107
   System.Web.UI.Page.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +490


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0