Null Pointer Exceptions on Post handling

Topics: ASP.NET 2.0
Jun 29, 2009 at 7:56 PM

What could be the cause of this null pointer exception received from default.aspx.cs?

I have seen the error come up repeatedly for several clients and usually perform a reinstall which results in loss of workmanship.

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

Source Error:

Line 32:     else if (Request.QueryString.Count == 0 || !string.IsNullOrEmpty(Request.QueryString["page"]))
Line 33: {
Line 34: PostList1.Posts = Post.Posts;
Line 35: Page.Title = BlogSettings.Instance.Name + " - " + BlogSettings.Instance.Description;
Line 36: }


Source File: [account path]\blog\default.aspx.cs    Line: 34

 

Any help would be greatly appreciated.

 

Thanks,

 

jberganz

Jun 30, 2009 at 9:53 AM

Can you debug the code and check what is null?

:Ajay

http://www.ajaymatharu.com

http://twitter.com/matharuajay