Error "Object reference not set to an instance of an object" in .../sitefinity/Administration/Users - Bugs & Issues - Bugs & Issues - Progress Community

Error "Object reference not set to an instance of an object" in .../sitefinity/Administration/Users

 Bugs & Issues

Error "Object reference not set to an instance of an object" in .../sitefinity/Administration/Users

  • Error "Object reference not set to an instance of an object" in .../sitefinity/Administration/Users
  • 245675_SF4-Object-reference-not-set-to-an-instance-of-an-object.jpg
    Hello. I get the problem:
    Environment:
    1. SiteFinity 4 01033Sitefinity_4.0.1110.0-Developers-Only
    2. FireFox 4.0b10pre (2011-01-25)
    3. Win 7 64bit

    How to:
    1. Implemented custom
    public class DummyRoleProviderSF4:RoleDataProvider
    and
    public
     class DummyMembershipProviderSf4:MembershipDataProvider
    2. Registered providers in SF4
    3. login in localhost:60876/.../Users
    4. Got the problem and error message "Object reference not set to an instance of an object"

    Question: How can i get more detailed analysis about this problem ?

    Thank you.
  • Hello Vik,

    Can you check the HTTP request and HTTP response when you get the error?  I am sending you a sample implementation for Membership provider that works fine at my end

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Telerik.Sitefinity.Security.Data;
    using Telerik.Sitefinity.Security.Model;
    using Telerik.Sitefinity.Security;
     
    namespace Telerik.Sitefinity.Samples
       public class MembershipDataProviderCustom : MembershipDataProvider
        
            public override Security.Model.User CreateUser(string userName)
            
               //
                return null;
            
     
            public override Security.Model.User CreateUser(Guid id, string userName)
            
                //
                return null;
            
     
            public override Security.Model.User GetUser(Guid id)
            
               //
                return null;
            
     
            public override IQueryable<Security.Model.User> GetUsers()
            
              //
                List<User> list = new List<User>(1) ;
                var manager = UserManager.GetManager();
                var q = manager.GetUsers().Where(us => us.UserName == "test1").SingleOrDefault();
                if (q == null)
                
                    var u = manager.CreateUser("test1");
                   manager.SaveChanges();
                    list.Add(u);
                    return list.AsQueryable<User>();
                
               list.Add(q);
               return list.AsQueryable<User>();
            
     
            public override void Delete(Security.Model.User item)
            
               //
            
        



    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items