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 1:  @model BlogGowebbi.Models.Property 
Line 2:          @using System.Text.RegularExpressions;@{ ViewBag.Title = "Details"; TempData["url_part"] = System.DateTime.Now.Ticks.ToString(); ViewBag.KeyWords= Model.KeyWords; ViewBag.Title= Model.MetaTitle; ViewBag.Description=Model.MetaDescription; TempData["ogUrl"] = "https://blogs.gowebbi.com/Blog/Details/" + Check(Model.URLTitle) + "?resize=" + TempData["url_part"]; TempData["ogTitle"] = Model.Title; TempData["ogDes"] = Model.ShareContent; TempData["ogImg"] = "https://blogs.gowebbi.com" + Model.Imageurl + "?resize=" + TempData["url_part"]; Layout = "~/Views/Shared/_Layout.cshtml";} <section id = "news-section" class="news_details"><div class="container"> <div class="row"> <div class="col-md-9"> <div class="single-blog-box-area"> <h2>@Model.Title</h2> <p><span class="admin-text"> @Model.Postedby</span> <span class="news_date"><i class="icon-icons228"></i>@Model.Date</span></p><div class="clearfix"></div><div class="row"> <div class="col-md-7"> <p>@Html.Raw(HttpUtility.HtmlDecode(Model.ShortDes))</p></div><div class="col-md-5"><img src = "@Model.Imageurl" alt="image"></div><div class="clearfix"></div><div class="col-md-12"> <p>@Html.Raw(WebUtility.HtmlDecode(Model.Description))</p>@if(!String.IsNullOrEmpty(Model.Youtubeurl)){String arr = ""; try{arr=Model.Youtubeurl.Split('v')[1].Split('=')[1].Split('&')[0].ToString();}catch (Exception){arr=Model.Youtubeurl.Replace("https://youtu.be/", "");}Model.Youtubeurl=arr; <div class="post-content-image"> @if(Model.Youtubeurl !="") {<iframe allowfullscreen = "true" allowscriptaccess = "always" frameborder = "0" src = "https://www.youtube.com/embed/@Model.Youtubeurl" title = "YouTube video player" class="blog-details-iframe"></iframe>}</div>}<ul class="ulcls"> <li class="licls"> <div class="fb-share-button" data-href="https://blogs.gowebbi.com/Blog/Details/@Check(Model.URLTitle)" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://blogs.gowebbi.com/Blog/Details/@Check(Model.URLTitle)&amp;src=sdkpreparse">Share</a></div></li><li class="licls"> <script src = "//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script> <script type = "IN/Share" data-url="https://blogs.gowebbi.com/Blog/Details/@Check(Model.URLTitle)"> </script> </li><li class="licls"> <script src = "https://apis.google.com/js/platform.js" async defer></script> <div class="g-plus" data-action="share" data-href="https://blogs.gowebbi.com/Blog/Details/@Check(Model.URLTitle)"></div></li><li class="licls"> <a class="twitter-share-button " href="https://twitter.com/intent/tweet?text=https://blogs.gowebbi.com/Blog/Details/@Check(Model.URLTitle)" data-size="large"> <i class="fa fa-twitter-square"> Tweet</i> </a> </li><li class="licls"> <a class="tumblr-share-button" data-color="blue" data-notes="none" href="https://embed.tumblr.com/share" data-title="@Check(Model.Title)" data-content="@Model.ShortDes" data-caption=""></a> <script>! function(d, s, id) { var js, ajs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = "https://assets.tumblr.com/share-button.js"; ajs.parentNode.insertBefore(js, ajs); } }(document, "script", "tumblr-js"); </script> </li><li> <a data-pin-do="buttonBookmark" data-pin-save="true" href="https://www.pinterest.com/pin/create/button/"></a> <script async defer src = "//assets.pinterest.com/js/pinit.js" ></script > </li ></ul > </div ><div class="p-t-30 p-b-30"> <div class="clearfix"></div></div><div class="p-b-50"> <div class="col-md-12"> <div class="comments comments-update-area"> <h3>Comments</h3> <hr/> @foreach(BlogGowebbi.Models.Property b in ViewBag.blogCommentlist) {<div class="media"> <div class="media-left media-middle"> <a href = "#" ><img src="/images/gowebbi-blog/blog-admin-img.jpg" alt="image"/></a> </div><div class="media-body"> <h4 class="media-heading">@b.Name</h4> <span>@Convert.ToDateTime(b.OnDate).ToString("MMM dd"), @Convert.ToDateTime(b.OnDate).ToString("yyyy") @*- <span class="color_red"><a href = "#" > Reply </ a ></ span > *@</span> <p>@b.Comments</p></div></div>}</div></div></div><div class="p-t-30 p-b-30"> <div class="clearfix"></div></div><div class="col-md-12"> <div class="heading"> <h3>Leave A Reply</h3> <hr/> </div><div class="row p-t-40"> <form action = "/Blog/PostComment" class="updated-reply-area"> <div class="col-md-6 col-sm-6"> <div class="single-query"> @Html.HiddenFor(model=> model.Blogid, new{@Value=Model.Srno}) <input type = "text" class="keyword-input" placeholder="Your Name" required name = "Name" > </div ></div ><div class="col-md-6 col-sm-6"> <div class="single-query"> <input type = "text" class="keyword-input" placeholder="Email Address" name="Email"> </div></div><div class="col-md-12"> <div class="single-query"> <textarea placeholder = "Massege" required name = "Comments" ></textarea > </div ></div ><div class="col-md-12"> <button type = "submit" class="btn-light">Submit</button> </div></form> </div></div></div></div></div><div class="col-md-3 col-sm-3 col-xs-12 white-area"> <div class="blog-update-sidebar-area"> <div class="signup-exclusive-online-business-tips"> <h4>Sign Up for Exclusive Online Business Tips</h4> <form action = "/Blog/Signup" method= "post" class="sign-up-form-area"> <div class="single-query"> <input class="keyword-input" placeholder="Your Name" autocomplete="off" name="Name" type="text" maxlength="50" required> <input class="keyword-input" placeholder="Email Address" name="Email" autocomplete="off" type="email" maxlength="200" required> <input class="keyword-input" placeholder="Your Phone" autocomplete="off" name="Phone" type="text" maxlength="40" required> <textarea class="keyword-input" placeholder="Your Comment" name="Message" maxlength="100" required></textarea> </div><button type = "submit" class="btn-light">Sign Up</button> </form> </div><div class="row"> <div class="col-md-12"> <h4>Latest Post</h4> @foreach (BlogGowebbi.Models.Property i in ViewBag.bloglist) {<div class="media p-t-10 p-b-10"> <div class="media-body"> <p>@(i.Date.ToString() !="" ? Convert.ToDateTime(i.Date).ToString("MMMM dd") : ""), @(i.Date.ToString() !="" ? Convert.ToDateTime(i.Date).ToString("yyyy") : "")</p><h4 class="media-heading"><a href = "/Blog/Details/@Check(i.URLTitle)" > @i.Title </a ></h4 > </div ></div >}</div></div></div></div></div></div></section><div class="container"> <a href = "#" class="back-to-top text-center display-block-area"> <i class="fa fa-angle-up"></i> </a> </div>@functions{string Check(string title) { if (!string.IsNullOrEmpty(title)) { title = title.ToLower(); title = Regex.Replace(title, @"&\w+;", "-"); title = Regex.Replace(title, @"[^a-z0-9\-\s]", "-"); title = title.Replace(' ', '-'); title = Regex.Replace(title, @"-{2,}", "-"); title = title.TrimStart(new[] { '-' }); if (title.Length > 80) { title = title.Substring(0, 79); } title = title.TrimEnd(new[] { '-' }); } return title; }}

Source File: c:\inetpub\vhosts\gowebbi.com\blogs.gowebbi.com\Views\Blog\Details.cshtml    Line: 2

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Views_Blog_Details_cshtml.Execute() in c:\inetpub\vhosts\gowebbi.com\blogs.gowebbi.com\Views\Blog\Details.cshtml:2
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105
   System.Web.WebPages.StartPage.RunPage() +17
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +64
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +256
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +173
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +45
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +45
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9873789
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159


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