locked
CustomMembershipProvider -> Only need ValidateUser RRS feed

  • Question

  • Hello,

    I have build a CustomMembershipProvider where the class is inherited from MembershipProvider.

    In this class I use the ValidateUser Function because I only need this for validation (have done that in ASP.NET without problems) - are there special requirements for Lightswitch when I want to use a Custom Membership Provider?

    which Functions do I have to override?

    UPDATE:

    I have build the CustomMembershipProvider and implemented (override) the following:

    • Initialize
    • ValidateUser
    • GetAllUsers

    other Sub/Functions/Propertys are empty because I need only Forms and Windows Authentification. In principle it works - it seems that for Windows Auth. it uses the GetAllUsers to find if it is a valid user and for Forms the ValidateUser.

    Problems - Windows Auth

    • if the user has no access granted I got the error "Invalid cross-thread access"
      sometimes in combination with "
      Unable to authenticate. Access is denied."

    • If I look to SQLServer Profiler I can see that the Stored Prcoedure which is used to get the Users in the GetAllUsers function are called multiple times - it seems it executes the GetAllUsers function for every Screen I open - why that?

    Forms Auth:

    • if I test my 2 Tier app I always get the following logon box:

      after typing the credentials I got the error "Invalid cross-thread access"
    • Generall Question: do I still need the RolePermissions Table if I use CustomMembershipProvider?
    • do I need the AspNetRoleProvider? -> I have set it to roleManager enabled="false"
    • do I need the AspNetProfileProvider? -> I have set it to profile enabled="false"

    Please Lightswitch team: can somebody give me the information what is important to build a CustomMembershipProvider for LS - are there any special point I have to take care

    robert





    • Edited by Mad Rian Saturday, December 8, 2012 6:23 PM
    Saturday, December 8, 2012 1:05 PM

All replies