ReL
  •  ReL
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2008-06-02T23:21:20Z
Hi.
in the new revision of MembershipHelper.cs there are problems with migrating the user roles from asp.net membership to yaf.
When I look in the user personal profile, it is not mentioned on which roles he is in.
This causes the users not to be able to see the forums after logging in for the first time.
After going back to the older version of MembershipHelper.cs everything was working again.

Ariel.

Sponsor
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2008-06-03T11:45:09Z
What are your exact membership/roles/profile settings in your web.config?
ReL
  •  ReL
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2008-06-03T18:33:23Z
<membership>

<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add connectionStringName="ZSQLProvider" enablePasswordRetrieval="false" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" maxInvalidPasswordAttempts="20" passwordAttemptWindow="10" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>


<roleManager enabled="true">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add connectionStringName="ZSQLProvider" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>


<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add connectionStringName="ZSQLProvider" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
</providers>
</profile>

this works fine with a previous version of MembershipHelper.cs.
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2008-06-04T11:36:15Z
You cannot use YafProfileProvider if you are not using YafMembership provider along with it.
soltys
  •  soltys
  • 62.6% (Friendly)
  • YAF Forumling
2008-06-05T22:50:51Z
Have the same problem.
my web.config looks like this


<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
      <providers>
        <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlServices" applicationName="MyApplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"/>
      </providers>
    </membership>

    <roleManager defaultProvider="AspNetSqlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" connectionStringName="SqlServices" applicationName="MyApplication" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      </providers>
    </roleManager>

    <profile defaultProvider="AspNetSqlProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
      <providers>
        <clear />
        <add name="AspNetSqlProfileProvider"
             type="System.Web.Profile.SqlProfileProvider"
             connectionStringName="SqlServices"
             applicationName="MyApplication"
             description="desc" />
      </providers>
      <properties>

      </properties>
    </profile>


User profile works ok. I mean I can login on forum with accounts from other application but I can`t make admin account. I've added manualy admin role in talbe yaf_prov_RoleMembership and added usert to group of administrators and that went well. When I loged in as admin and gave other user admin role - nothing happend...When using .net Membership which tables of database are in use to verify eg. roles? Those from yaf or from asp.net?
Users browsing this topic

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved