Server Error in '/' Application.

Cannot perform runtime binding on a null reference

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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference

Source Error:


Line 4:  	var product = Product.GetDetail(Page.ProductId);
Line 5:  
Line 6:     Page.Title = product.Description + " | The Shoe Spa";
Line 7:  }
Line 8:  

Source File: c:\Inetpub\wwwroot\Shared\Custom\Productdetail.cshtml    Line: 6

Stack Trace:


[RuntimeBinderException: Cannot perform runtime binding on a null reference]
   CallSite.Target(Closure , CallSite , Object ) +124
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +4197732
   CallSite.Target(Closure , CallSite , Object ) +222
   ASP._Page_Shared_Custom_ProductDetail_cshtml.Execute() in c:\Inetpub\wwwroot\Shared\Custom\Productdetail.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +208
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90
   System.Web.WebPages.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) +225
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +12
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
   CallSite.Target(Closure , CallSite , _Page_ProductDetail_cshtml , Object ) +100
   ASP._Page_ProductDetail_cshtml.Execute() in c:\Inetpub\wwwroot\ProductDetail.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +208
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
   System.Web.WebPages.StartPage.RunPage() +19
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +67
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +121


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