NullReferenceException in Default.aspx

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/21/2012 4:51:25 PM
ABM
Gravatar
Total Posts 37

NullReferenceException in Default.aspx

Woo hoo! As I was typing the details to my error, I was rereading it before posting and I got an idea. I'm new to .net so the following error intimidated me. However, after the initial confusion wore off, reading the error stack started to make sense. Hopefully I can prevent some stress for someone with a similar problem. Parts of the error message mentioed GetRolesFromCookie leading me to think it is a problem with the cookie, especially since I am always logged into my site. Furthermore, this error happened in Firefox. IE8 works fine. I deleted the cookies for my site in Firefox and the site comes up fine now!

Joe, if you're reading this, awesome product! It has really saved me time from building websites and I can concentrate on designing them. My next project is to start building add-ins. Thanks, Joe!

2012-01-21 15:06:27,656 ERROR mojoPortal.Web.Global - 68.9.114.159-en-US - /Default.aspx
System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.mojoRoleProvider.GetRolesFromCookie()
at mojoPortal.Web.mojoRoleProvider.GetRolesForUser(String userName)
at System.Web.Security.RolePrincipal.IsInRole(String role)
at mojoPortal.Business.WebHelpers.WebUser.IsInRole(String role)
at mojoPortal.Business.WebHelpers.WebUser.get_IsAdmin()
at mojoPortal.Web.UI.AnalyticsAsyncTopScript.DoInit()
at mojoPortal.Web.UI.AnalyticsAsyncTopScript.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

1/22/2012 7:03:21 AM
Gravatar
Total Posts 18439

Re: NullReferenceException in Default.aspx

Hi,

Actually this was reported previously on this thread, and we determined it was the result of a change from the recent ASP.NET security update that came down via windows update. The problem occurred if you had a persistent role cookie then it started throwing this exception right after the update was applied. It can be solved by clearing the cookies as you found, but I also patched the 2.3.7.6 release to handle this error and reset the cookie automatically. The reason it didn't happen in IE is probably because you didn't already have a persistent cookie there.

Thanks for the compliments on mojoPortal!

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.