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:


Line 34:            
Line 35:            var cardPage = umbHelper.TypedContent(pageID);
Line 36:            var cardProperties = cardPage.GetPropertyValue<ArchetypeModel>("regionalRepresentative").Where(c => c.Id.ToString() == cardID).First();
Line 37: 
Line 38:            var vCardObject = itemVCard.vCardCretor(cardProperties.GetValue("name"), cardProperties.GetValue("surname"), cardProperties.GetValue("company"), cardProperties.GetValue("position"), cardProperties.GetValue("phone"), cardProperties.GetValue("email"), cardProperties.GetValue("webSite"));

Source File: c:\inetpub\wwwroot\mercor\vCard.ashx    Line: 36

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.PublishedContentExtensions.GetPropertyValue(IPublishedContent content, String alias, Boolean recurse, Boolean withDefaultValue, T defaultValue) +36
   Umbraco.Web.PublishedContentExtensions.GetPropertyValue(IPublishedContent content, String alias) +74
   vCard.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\mercor\vCard.ashx:36
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +3383
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +1361


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