Skip to content

Instantly share code, notes, and snippets.

View yeahmx91's full-sized avatar

jinx_d yeahmx91

View GitHub Profile
@dzitkowskik
dzitkowskik / LdapConnect.cs
Last active January 11, 2024 09:07
How to authenticate user in Ldap / OpenLdap using C# (user: test in domain ghashd.servebeer.com, server on ip 192.168.0.12 port 389)
using System;
using System.Net;
using System.DirectoryServices;
using System.DirectoryServices.Protocols;
using System.Security.Permissions;
namespace LdapConnection
{
[DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
public class LdapConnect