YAFLogo

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hello and thanks in advance for any assistance.

I have successfully installed 1.9.3 and integrated with an existing site using my own Custom Membership Provider, but using Yaf's Role and Profile providers.

I went through the new install, creating a database from scratch.

Everything seems to be working great except:

I cannot see any forums or topics listed. I cannot see a "new topic" or "new post" button anywhere. I am only able to see the top level category list. If I click on the category, it navigates there, but again not displaying any of the forums. If I click "+" next to the category, it seems to "expand" and changes to a "-", but no forums listed.

In the admin I have gone through and created multiple categories, and multiple forums. I have attempted to flag these forums in various ways (i.e. moderated, locked, test, etc) just for debugging purposes, but nothing I do seems to make them display. I have verified their existance in the DB.

Please any help is appreciated, I feel so close to getting the install working but I have no idea what may be causing this problem, and haven't seen any similar posts on here.

Thanks,

Marco

P.S. Notice a lot of views on this topic.. anyone else experiencing the same issue?

Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
This is a unique problem... Question: Are you using a custom membership provider or YAF's?

What roles are avaliable and linked in YAF admin? You cannot see topics logged in as admin?

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago

This is a unique problem... Question: Are you using a custom membership provider or YAF's?

What roles are avaliable and linked in YAF admin? You cannot see topics logged in as admin?

Jaben wrote:

Yes, I am using a custom membership provider, and I have not implemented every single method stub in the process. However, I have implemented the major methods, such as ValidateUser, and GetUser.

I cannot see the topics if I am an Administrator or just a Registered member. I am not getting any error, etc, just not able to see any forums or topics etc.

Again only able to see the top-level categories.

If it may make a difference, I've integrated YAF using the source, adding as a sub directory to my application, and making the appropriate web.config changes, and other config file additions.

As I mentioned all works great. My membership provider is being called, and Yaf roles are working correctly as far as I can tell (Admins see the admin link, registered members do not).

I am still clueless as to why this is happening, however. I cannot see topics, posts, etc, regardless of what I do.

Any advice?

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
Unfortunately, YAF Roles and YAF profile MUST be used with YAF Membership. They are quite dependent on YAF membership.

You need to use a different Role provider -- I suggest just the standard ASP.NET role provider if you are not making your own custom version.

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hi Jaben,

Thanks for the response. So just to clarify, do I need to inherit from YAF Membership in my own provider if I want to continue to use YAF Roles and YAF Profile?

You suggest using the standard role provider, so does this mean I would use my custom membership provider, the standard .NET role provider, and the YAF profile provider?

Also what affects does this have in terms of single-sign-on?

Thanks agin,

Marco

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
It's not so much about YAF membership inheritance... it's that YAF roles depends on the Database Structure of YAF Memembership -- basically, it links to a Membership user.

You cannot use YAF Profile Provider without using YAF membership. So you'd use .NET role provider and .NET profile provider.

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hi Jaben,

Appreciating your help, but still having a very difficult time with this.

http://wiki.yetanotherforum.net/1.9.3%20Integration%20with%20existing%20site.ashx 

That I need to inherit from YafProfileProvider, but you say I cannot use that profile provider without using membership.

Basically I have two seperate databases, yaf and my main db (with my membership, roles, etc).

As I said I have a custom membership provider, and now I have created a custom role provider inheriting from System.Web.Security.RoleProvider.

I have attemtped to use the YafProfile provider, obviously that's not working. I have then attempted to use the standard profileprovider, and in doing so I'm getting the following error:


Line 126:
Line 127:			// render the forum
Line 128:			base.Render( writer );
Line 129:
Line 130:			writer.WriteLine( "</div></div>" );
 

Source File: c:\Inetpub\wwwroot\GV\App_Code\YAF\Forum.cs    Line: 128 

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   YAF.Classes.Data.DB.user_guest(Object boardID) +116

I have also attempted to create a custom profile provider, applying the inheritance in the web.config provider tag, as I cannot inherit direction in the code, I get a scoping error.

Using this custom profile provider, I get the same error as above.

Is there something I need to do to "link" my roles with YAFs? Anything else I'm doing wrong?

Thanks again, trying hard...

-Marco

Boskone
16 years ago
Perhaps this will help.

DNN uses the standard aspnet membership provider only.

What I have done was to use the same membership provider, the standard aspnet role provider and the YAF profile provider.

Here is the web.config entries.

<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" passwordFormat="Encrypted" applicationName="DotNetNuke" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />
      </providers>
    </membership>
    <!-- YAF Support -->
    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
      <providers>
        <clear/>
        <add connectionStringName="SiteSqlServer" applicationName="DotNetNuke"
            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="SiteSqlServer" applicationName="DotNetNuke" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
      </providers>
    </profile>
    <!-- END -->

So I would think you can use your membership provider, the standard role provider and the YAF profile provider.


Boskone - A DotNetNuke user.

RDSCC 

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Thanks for the reply.

I believe my trouble is happening because of my custom providers, however.

Completley boggled...

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
You do not inherit from "YAFProfileProvider".

But it's required that no matter which profile provider you use you inherit the YAF profile class which is unrelated to the provider.

inherits="YAF.Classes.Utils.YafUserProfile"

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Jaben,

Thanks. Yes I misspoke, but this is how I am inheriting.

Currently these are my provider declarations:


<membership defaultProvider="GMembershipProvider"  userIsOnlineTimeWindow="30">
      <providers>
      <add name="GMembershipProvider"
         type="GMembershipProvider"
         applicationName="GV"
         requiresUniqueEmail="true"
         passwordFormat="SHA1"
         description="Stores and retrieves membership data from SQL Server"
         decryptionKey="<removed>"
         validationKey="<removed>"
        />
      </providers>
    </membership>

    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
      <providers>
        <clear/>
        <add connectionStringName="GVConnectionString" applicationName="GV"
          name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
      </providers>
    </roleManager>
 
    <profile defaultProvider="AspNetSqlProfileProvider" enabled="true" inherits="YAF.Classes.Utils.YafUserProfile">
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider"
             connectionStringName="GVConnectionString"
             applicationName="GV"
             type="System.Web.Profile.SqlProfileProvider" />
      </providers>
      <properties>
        <add name="Theme" allowAnonymous="false" defaultValue="ASPNETBlue"/>
      </properties>
    </profile>

Any idea at all why I'm getting the error described in my previous post?

Is there a way I can force yaf to try to do a reinstall of the DB, certain table to be droped, etc?

Thank you,

Marco

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Jaben,

I have reinstalled the database using the install tool, and I have gotten it working.

Thanks for all your help.

-Marco

mmbianco
  • mmbianco
  • 56.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Jaben,

I may have spoken too soon.

While I am able to logon, I am experiencing the issues with the roles not synching.

I have seen some other posts on this matter,

http://forum.yetanotherforum.net/yaf_postst6304_YAF-and-existing-role-provider-not-friends.aspx 

http://forum.yetanotherforum.net/yaf_postst6248_Problem-with-newbie-role.aspx 

Again I'm currently using my own custom membership provider, aspnet role provider, and aspnet provile provider, inheriting from YAF.Classes.Utils.YafUserProfile, as you can in my web.config above.

If a user is part of the "Registered" role, in my aspnet role provider, then how can I make them be recognized as "Registered" in YAF? The roles are in the Roles admin section, and I see them showing up as Linked. Right now I can navigate to a user in yaf admin, and select Registered, and it works, but obviously I cannot do this for every new user.

How can a user that's registered on my site, logon, go to YAF and have Member permissions by default?

http://forum.yetanotherforum.net/yaf_postsm26395_Role-synchronization-bug.aspx#post26395