« Previous Next »

Not Answered Thread: Role and Membership Issues

Last post 06-29-2009 8:51 PM by phyxious. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 06-28-2009, 11:26 AM

    • phyxious
    • Not Ranked
    • Joined on 05-21-2009, 9:40 AM
    • Posts 3

    Role and Membership Issues

    I am hoping this is the proper place for this post.

    I was following this tutorial http://blogs.iis.net/robert_mcmurray/archive/2009/04/20/creating-a-read-only-membership-provider-for-phpbb-2-0-users.aspx

    I added the dll to the GAC and added it in the trusted providers, but when I try visiting the site for testing purposes I get a runtime error.

    If I go into IIS Manager and click on .NET Roles or Management I get an error saying:

    This feature cannot be used becaused the default provider type could not be determined to check whether it is a trusted provider.

    You can use this feature only when the default provider is a trusted provider. If you are a server administrator, you can make a provider a trusted provider by adding the provider type to the trusted providers list in the Administrator.config file. The provider has to be strongly typed and added to the GAC.

    Like I said I have added it to the GAC and my trusted provider list in the Administrator.config file is like the following:

    <trustedProviders allowUntrustedProviders="false">
                    <add type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                    <add type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                    <add type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                    <add type="ReadOnlyPhpBBProvider.PhpBBRoleProvider, ReadOnlyPhpBBProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2a82024dfaaad1e4" />
                    <add type="ReadOnlyPhpBBProvider.PhpBBMembershipProvider, ReadOnlyPhpBBProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2a82024dfaaad1e4" />
                </trustedProviders>

    What do I need to do in order to get this to work? Am I missing something?

  • 06-29-2009, 7:34 AM In reply to

    • phyxious
    • Not Ranked
    • Joined on 05-21-2009, 9:40 AM
    • Posts 3

    Re: Role and Membership Issues

    I take it this must be the wrong forum as no one has an answer, thanks for your help anyways

  • 06-29-2009, 4:47 PM In reply to

    Re: Role and Membership Issues

    What is the provider that you have specified in your web.config?
    The way this feature works is by looking at the application's web.config and based on the "defaultProvider" attribute in the Membership section and making sure that the type is available in the trustedProviders section.

    I cannot remember if its also required to add the assembly to the compilation section in the assemblies collection, but I would first double check the provider you've specified in web.config,

  • 06-29-2009, 8:51 PM In reply to

    • phyxious
    • Not Ranked
    • Joined on 05-21-2009, 9:40 AM
    • Posts 3

    Re: Role and Membership Issues

    The provider in my web.config is:

    <!-- Add the read-only membership provider and set it as the default. -->

    <membership defaultProvider="ReadOnlyPhpBBMembershipProvider">

    <providers>

    <add name="ReadOnlyPhpBBMembershipProvider"

    type="ReadOnlyPhpBBProvider.PhpBBMembershipProvider, ReadOnlyPhpBBProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2a82024dfaaad1e4"

    description="Read-only PhpBB membership provider"

    connectionStringName="PHPConnString" />

    </providers>

    </membership>

    <!-- Add the read-only role provider and set it as the default. -->

    <roleManager defaultProvider="ReadOnlyPhpBBRoleProvider" enabled="true">

    <providers>

    <add name="ReadOnlyPhpBBRoleProvider"

    type="ReadOnlyPhpBBProvider.PhpBBRoleProvider, ReadOnlyPhpBBProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2a82024dfaaad1e4"

    description="Read-only PhpBB role provider"

    connectionStringName="PHPConnString" />

    </providers>

    </roleManager>

Page 1 of 1 (4 items)
Microsoft Communities