Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

Last post 07-28-2007 10:14 PM by gwtech. 4 replies.

Sort Posts:

  • Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

    07-27-2007, 1:32 PM
    • Member
      4 point Member
    • gwtech
    • Member since 07-27-2007, 1:17 PM
    • Lac La Hache Canada
    • Posts 18

    New Error. Anyone getting this? 

    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 45:             _memberid = New Guid(member_id.ToString())
    Line 46:             Dim memUser As MembershipUser = Membership.GetUser(_memberid)
    Line 47:             _joined = memUser.CreationDate
    Line 48:             _online = memUser.IsOnline
    Line 49:             _email = memUser.Email

    Source File: D:\vhosts\catahouligans.com\httpdocs\ClubSite\App_Code\ForumUser.vb    Line: 47

  • Re: Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

    07-27-2007, 3:05 PM
    • Member
      626 point Member
    • zowens
    • Member since 10-11-2006, 9:40 PM
    • Indiana
    • Posts 242

    First, you need to check and see if the user is still in the database. If not, then the error would make sence.

    If the user is in the database, check to see that the CreationDate is valid for that member.

    Zack Owens

    Coordinator for the ClubStarterKit (Open Source)
    http://codeplex.com/clubstarterkit
  • Re: Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

    07-27-2007, 3:58 PM
    • Member
      4 point Member
    • gwtech
    • Member since 07-27-2007, 1:17 PM
    • Lac La Hache Canada
    • Posts 18

    That's what I thought but the user is me. The only thing I did was upload a new avitar. I deleted the post and made a new one and it works. Leads me to think that may somehow be connected by the date.

    Your thoughts,

    Greg

     

  • Re: Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

    07-27-2007, 5:04 PM
    • Member
      626 point Member
    • zowens
    • Member since 10-11-2006, 9:40 PM
    • Indiana
    • Posts 242

    Are you logged in?

     

    Look at the _joined delcaration. Does it have a DateTime type? I found out something didn't have the correct type this morning when I was converting to C#.

    Zack Owens

    Coordinator for the ClubStarterKit (Open Source)
    http://codeplex.com/clubstarterkit
  • Re: Trying to Read first Post in Forum. Error: Line 47: _joined = memUser.CreationDate

    07-28-2007, 10:14 PM
    • Member
      4 point Member
    • gwtech
    • Member since 07-27-2007, 1:17 PM
    • Lac La Hache Canada
    • Posts 18

    I'll look into that.

     

    Thanks,

    Greg

     

Page 1 of 1 (5 items)