Activities of "devmahmod"

Do i need to copy all of this folder Account And put in my web project ?

I want to disabled autocomplete for password login how to make by easy way

I want to add meta tags and ld+json for cms page created by admin i'm workin with mvc core razor

I'm working with abp framewrok pro mvc core razor how can as admin when add html able to preview page

Answer

hi can you provide me your mail please to send configuration to test i can't find problem

Answer

also ai said Install the necessary NuGet package:

Add the Volo.Abp.Account.Pro.Ldap package to your project.

and see screenshot i can't find it and i have abp pro

Answer

Thanks,

 var filter = $"(&(objectClass=person)(uid={testUserName}))"; this works for me when try this 

var server = "xxxx";
var serverPort = xxxx;
var baseDc = "xxxx";

var adminUserName = "xxxx";
var adminPassword = xxxx";

var testUserName = "xxxxx"; // short name or sAMAccountName
var testPassword = "xxxx"; // real user password

using (var ldapConnection = new LdapConnection())
{
    ldapConnection.Connect(server, serverPort, Native.LdapSchema.LDAP, Native.LdapVersion.LDAP_VERSION3);

    try
    {
        // Bind as admin
        await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
        {
            UserName = $"CN={adminUserName},{baseDc}",
            Password = adminPassword
        });

        Console.WriteLine($"{adminUserName} login success!");

        // Search user
        var filter = $"(&(objectClass=person)(uid={testUserName}))";
        var searchResults = await ldapConnection.SearchAsync(baseDc, filter);

        var userEntry = searchResults.FirstOrDefault();
        if (userEntry == null)
        {
            Console.WriteLine($"User '{testUserName}' not found.");
         
        }

        Console.WriteLine($"{testUserName} DN: {userEntry.Dn}");

        // Try binding as the user
        await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
        {
            UserName = userEntry.Dn,
            Password = testPassword
        });

        Console.WriteLine($"{testUserName} login success!");
    }
    catch (Exception e)
    {
        Console.WriteLine($"LDAP Error: {e.Message}");
    }

    Console.ReadKey();
}

I make this code in program.cs and it gives me login success and also can't login with this user , i tried to make cofigration from app setting and also admin ui not working

Answer

you mean i don't need to do any code to sync ldab users, but i tried steps and not work, can we please have meting in zoom ?

Answer

how user in ldap will be able to login and this user not in abpusers table ?

Answer

I try this code it gives me searchResults count 0

public async static Task<int> Main(string[] args)
{
    var server = "xxx.xxx.com";
    var serverPort = 12345;
    var baseDc = "DC=xxx,DC=com";
    var adminUserName = "xxx";
    var adminPassword = "xxx";
    var testUserName = "xxx@xxx.com"; // Replace with a real AD user
    var testPassword = "xxx";         // Replace with actual password

    using (var ldapConnection = new LdapConnection())
    {
        ldapConnection.Connect(server, serverPort, Native.LdapSchema.LDAP, Native.LdapVersion.LDAP_VERSION3);

        try
        {
            // Bind as LDAP admin (Bind DN)
            await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
            {
                UserName = $"CN={adminUserName},{baseDc}",  // Important: Full DN of bind user
                Password = adminPassword
            });

            Console.WriteLine($"{adminUserName} bind success!");

            // Search for the user using sAMAccountName (common in Active Directory)
            var filter = $"(&(objectClass=user)(sAMAccountName={testUserName}))";
            var searchResults = await ldapConnection.SearchAsync(baseDc, filter);

            if (!searchResults.Any())
            {
                Console.WriteLine($"User {testUserName} not found.");
                
            }

            var userEntry = searchResults.First();
            Console.WriteLine();
            Console.WriteLine($"{testUserName} attributes:");
            Console.WriteLine(string.Join(", ", userEntry.ToDirectoryEntry().Attributes));

            // Now bind as the found user to test password
            await ldapConnection.BindAsync(Native.LdapAuthType.Simple, new LdapCredential
            {
                UserName = userEntry.Dn,
                Password = testPassword
            });

            Console.WriteLine();
            Console.WriteLine($"{testUserName} login success!");
        }
        catch (Exception e)
        {
            Console.WriteLine("LDAP Error:");
            Console.WriteLine(e.Message);
        }

        Console.ReadKey();
    }
    ```
Showing 1 to 10 of 36 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 10, 2025, 06:30