Azman with SQL Datastore does not work with LDAP Query Dynamic Gro

Discussion in 'ASP .Net Security' started by RiverWay, Apr 20, 2010.

  1. RiverWay

    RiverWay Guest

    I have used Azman with Active Directory data store succesfully in my web
    application as a Role Provider. I wanted to use the new features of Windows
    Server 2008 version of Azman which can have a SQL Database as a data store.
    But when I switched to this new Azman Store with SQL2008 database, the LDAP
    Query groups won't return correct answer about membership of a role, which
    was working fine in Active Directory Azman.

    Here is connection strings of two different kind of Azman:
    1) <add name="ConnectionStringAZMAN"
    connectionString="msldap://172.20.20.50/CN=Mycompany Apps,CN=Program
    Data,DC=corp,DC=mycompany,DC=com"/>
    2) <add name="ConnectionStringAZMAN"
    connectionString="mssql://Driver=SQL Server;Server=SQL2008;/AzMan/AzStore"/>

    The following is the LDAP query filter to define a Dynamic Group named
    "Inspectors" in Azman: (&(objectClass=user)(title=*Inspector*))
    I tried this style too but the same:
    msldap://172.20.20.50:389/OU=Staff,DC=corp,DC=mycompany,DC=com?*?sub?(&(objectClass=user)(title=*Inspector*))
    (&(objectClass=user)(title=*Inspector*))


    This is the code part of checking membership in my web application:
    if (System.Web.Security.Roles.IsUserInRole(str_userPrincipal,
    "PaintLog_Inspector"))

    This code was working fine (returns true for a user) with Azman of AD data
    store but fails (returns false for the same user) in Azman of SQL. I guess
    the new library code of MS which checks the membership drilling through
    dynamic query group is not working properly but I am not sure. Could it be a
    permission related issue? There was no error message but the IsUserInRole()
    function returns wrong answer from Azman+SQL.

    I am running out of idea stucking at this point. Please help me. Thank you.

    Development Environment:
    -Visual Studio 2008 in XP with the latest service pack
    -The DC with Active Directory is Windows Server 2008 R2
    -I tested the same web application with SQL Azman in VS2010 installed in a
    Windows Server 2008 R2 because XP wouldn't support the new function of SQL
    Azman.
    -SQL Server for Azman is SQL 2008 (not R2)
     
    RiverWay, Apr 20, 2010
    #1
    1. Advertising

  2. RiverWay

    RiverWay Guest

    I have found the solution. I said I copied my web application project to a
    Windows Server 2008 machine (we don't have Vista or 7 machine) and installed
    VS2010 to test run in it because my XP development machine can't run the new
    Azman feature with SQL store.

    In the VS2010 of Windows Server 2008 R2 (connected by rdp), when I removed
    the System.Web from References entries and added again, the web application
    started working again. I mean the IsUserInRole() function returned 'true' for
    the user drilling correctly into LDAP query group definition. FYI,
    'PaintLog_Inspector' role had a member of a dynamic group, which queries all
    AD users who has the word 'inspector' in their title attribute.

    I guess the cause of the problem was that my VS project was maintaining XP
    binaries of [System.Web] (more specifically
    System.Web.Security.AuthorizationStoreRoleProvider) when moved to Windows
    Server 2008 R2 machine, which includes Azman related code. By refreshing the
    Reference list, VS2010 must have reloaded the right binary from the new
    Windows Server 2008 R2 machine.

    Just hoping anybody out there who may experience the similar problem...
    Happy coding.
     
    RiverWay, Apr 21, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruno
    Replies:
    0
    Views:
    410
    Bruno
    Jan 3, 2006
  2. Bruno
    Replies:
    4
    Views:
    1,867
    Bruno
    Jan 4, 2006
  3. Anonymous
    Replies:
    0
    Views:
    1,544
    Anonymous
    Oct 13, 2005
  4. Michael Herman \(Parallelspace/OpenCanal\)

    AzMan: Has anyone created an HTML/Web management console as an alternative to the AzMan MMC?

    Michael Herman \(Parallelspace/OpenCanal\), Jan 6, 2006, in forum: ASP .Net Security
    Replies:
    0
    Views:
    280
    Michael Herman \(Parallelspace/OpenCanal\)
    Jan 6, 2006
  5. Lars Sundstrom

    Azman. Unable to recive rolls from Azman.

    Lars Sundstrom, Oct 9, 2008, in forum: ASP .Net Security
    Replies:
    0
    Views:
    777
    Lars Sundstrom
    Oct 9, 2008
Loading...

Share This Page