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 61:         {
Line 62:             User u = User.Load(post.Username);
Line 63:             return "<table><tr><td>On " + UIUtility.GetFormattedDateTimeFor(SessionUtility.CurrentUser, post.PostDate) + "</td></tr><tr><td>By " + u.DisplayName + " | <a href='" + UIUtility.BaseSiteURL + "/Forum.aspx?ForumID=" + forumID + "&PostID=" + (post.ParentPostID == null ? post.ID : post.ParentPostID) + "&Page=" + int.MaxValue + "&Bookmark=" + post.ID + "'>Read</a></td></tr></table>";
Line 64:         }
Line 65:         else

Source File: c:\inetpub\www.fantasyrealmonline.com\Controls\ForumView.ascx.cs    Line: 63

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_ForumView.GetLatestPost(ForumPost Post) in c:\inetpub\www.fantasyrealmonline.com\Controls\ForumView.ascx.cs:63
   ASP.controls_forumview_ascx.__DataBind__control17(Object sender, EventArgs e) in c:\inetpub\www.fantasyrealmonline.com\Controls\ForumView.ascx:120
   System.Web.UI.Control.OnDataBinding(EventArgs e) +131
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +169
   System.Web.UI.Control.DataBindChildren() +11154943
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +674
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68
   Controls_ForumView.BindData() in c:\inetpub\www.fantasyrealmonline.com\Controls\ForumView.ascx.cs:183
   Controls_ForumView.Page_Load(Object sender, EventArgs e) in c:\inetpub\www.fantasyrealmonline.com\Controls\ForumView.ascx.cs:89
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8806; ASP.NET Version:2.0.50727.8762