Share main site login detaisl with sub site(forum)

Feb 21, 2013 at 5:46 PM
I have MVC3 application. i have created nearforum as Sub web site. And i use to login aspnet memebership provider for handle my login

When i login to main site and came to forum following error raise

Value cannot be null.
Parameter name: Can not finish membership signin with membership not set.

Here is code where raise error

public static int TryFinishMembershipLogin(SessionWrapper session, MembershipUser membershipUser, IUsersService service)
        if (membershipUser == null)
            throw new ArgumentNullException("Can not finish membership signin with membership not set.");
        var siteUser = service.GetByProviderId(AuthenticationProvider.Membership, membershipUser.ProviderUserKey.ToString());

        if (siteUser == null)
            //User does not exist on Nearforums db
            siteUser = new User();
            siteUser.UserName = membershipUser.UserName;
            siteUser.Email = membershipUser.Email;
            siteUser = service.Add(siteUser, AuthenticationProvider.Membership, membershipUser.ProviderUserKey.ToString());
        session.SetUser(siteUser, AuthenticationProvider.Membership);

        return siteUser.Id;
I want share main site login details with forum site
Feb 22, 2013 at 10:55 AM
It looks like the you are using Nearforums from the default branch. If that is the case, you shouldn't. You should the release (recommeded) or if you want to compile your own, you should use version-008 branch.

The default branch of development is recommended for Nearforums team devs, it is not stable :)

Is this the case?
If not, let me know and we can take a deeper look.

Kind Regards,
May 2, 2013 at 3:24 AM
I'm stucked here.. i want to share main login with sub domain (forum) and subdomain (forum) with main...
in main site i use my custom membership provider and my custom user database...
i overrided some function to correct login and signup
i intergrated login from forum to main... but i can keep login status for both... main site and forum (sub folder)..

Sorry for my bad English :(...
Dec 10, 2013 at 1:05 PM
If you are trying to run from source code, you have to setup in IIS. You can not just "Set Startup Project" and hit run or you get "Can not finish membership signin with membership not set."