« Previous Next »

Thread: Getting the XML Membership Provider to work with Forms Authentication

Last post 11-08-2009 7:07 PM by homerggg. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 01-21-2008, 3:29 PM

    Getting the XML Membership Provider to work with Forms Authentication

    I have followed the instructions in the "How to Take Advantage of the IIS7 Integrated Pipeline" (http://www.iis.net/articles/view.aspx/IIS7/Extending-IIS7/Getting-Started/How-to-Take-Advantage-of-the-IIS7-Integrated-Pipel) article and I am getting the following error when trying to access .NET users in the ISM:

    "This feature cannot be used because 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 Administration.config file.  The provider has to be strongly typed and added to the GAC."

    I do get the login page when accessing the app from a web browser, but when I submit the form, I get the following error:

    "Could not load type 'AspNetReadOnlyXmlMembershipProvider'."

     I am new to .NET providers and would appreciate assistance with getting the XML provider to work.  I am running Windows 2008 Standard RC1.

     

  • 01-23-2008, 12:35 PM In reply to

    • mvolo
    • Top 25 Contributor
    • Joined on 09-17-2003, 1:48 PM
    • Philadelphia, PA
    • Posts 584

    Re: Getting the XML Membership Provider to work with Forms Authentication

    Hi Drichfield,

    Unfortunately a recent security change now prevents the ability to manage users and roles from IIS Manager using providers provided as part of your application (think /App_Code or /BIN).

    To work around this, you can compile the provider into a strongly-named signed assembly, and register it in the GAC. Then, use the full assembly-qualified type in the provider's configuration to identify this provider. This will allow you to use IIS Manager, which is by far the easiest way to create and manage Membership users.

    Without IIS Manager, you can still create and manage users using Membership APIs directly even if you use application-based providers, but that requires you to write a custom page to manage the users or roles.  You can use the CreateUserWizard control to quickly do this in an ASP.NET page: http://msdn2.microsoft.com/en-us/library/ms178334.aspx.

    As far as your "Could not load type error", can you show the contents of your web.config file, particularly the <membership> configuration section?

    Thanks,

    Mike Volodarsky

    Program Manager
    IIS Core Server
    Visit mvolo.com for more IIS 7.0 posts, tools, and info

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-07-2009, 5:31 PM In reply to

    • homerggg
    • Not Ranked
    • Joined on 08-02-2004, 10:02 AM
    • Posts 5

    Re: Getting the XML Membership Provider to work with Forms Authentication

    Is the behavior of IIS 7.0 is to just hide icons such as ".NET Users" and "Providers" in case like this one ?

     I'm facing this problem (Providers and .NET Users icons not visible in my web application), but I'm using System.Web.Security.SqlMembershipProvider as my membership provider. I'm wondering why, if I change the application pool of my web application back to DefaultAppPool (instead of ASP.NET v4.0), those icons comes back.

     

     

  • 11-07-2009, 7:36 PM In reply to

    Re: Getting the XML Membership Provider to work with Forms Authentication

    Currently those features do not support .NET 4.0 and so they get hidden.

  • 11-08-2009, 7:07 PM In reply to

    • homerggg
    • Not Ranked
    • Joined on 08-02-2004, 10:02 AM
    • Posts 5

    Re: Getting the XML Membership Provider to work with Forms Authentication

    So If I want to add users I would have to do this like mvolo suggested ?

    Would you say I should use ASP.Net 2.0 instead ?

    I don't know why I should use ASP.Net 4.0 beside the fact that it is new and that VS 2010 Beta 2 allow me to use that framework.

    Oh, and thanks for the fast reply !

     

Page 1 of 1 (5 items)
Microsoft Communities