Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vasily 7 posts 27 karma points
    Aug 09, 2012 @ 11:13
    Vasily
    0

    Umbraco 4.8 & YAF integration. YAF membership provider

    Hi, I'm trying to integrate Umbraco 4.8 with YAF 1.9.6.1 and make both use YAF membership provider.

    When I login to Umbraco's backoffice with one of the administrator's account, I get the following error:

     

    No User exists with ID -1

    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.ArgumentException: No User exists with ID -1

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [ArgumentException: No User exists with ID -1]
       umbraco.BusinessLogic.User.setupUser(Int32 ID) +739
       umbraco.cms.presentation.login.Button1_Click(Object sender, EventArgs e) +505
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
    

     

     

    The reason to use YAF's membership provider is because I already have a YAF forum with around 500 users in it.

    What changes I have made:

    the database contains both umbraco's and yaf's tables. Umbraco's users table contains only one user - 'admin' that was set during the installation of umbraco.

    yaf's users table contains several users in 'Administrators' role. When I'm trying to login to Umbraco's backoffice with 'admin' user - everything works fine. But as soon as I'm trying to login with different administrators account - i get an error.

    Umbraco's web.config contains yaf's membership providers:

    <authentication mode="Forms">
            <forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies" domain="hpammi.ru"/>
        </authentication>
    
        <membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
            <providers>
                <clear/>
                <add connectionStringName="LocalSqlServer" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/>
            </providers>
        </membership>
    
        <roleManager enabled="true" defaultProvider="YafRoleProvider">
            <providers>
                <clear/>
                <add connectionStringName="LocalSqlServer" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/>
            </providers>
        </roleManager>
    
        <profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Utils.YafUserProfile">
            <providers>
                <clear/>
                <add connectionStringName="LocalSqlServer" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
            </providers>
        </profile>

     

    can someone please help me to solve the problem? So I can be able to login into the Umbraco's back office with any Adminitrstors account

     

    Thank  you

Please Sign in or register to post replies

Write your reply to:

Draft