You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.DirectoryServices is not supported on Ubuntu 14.04
General
I use the .net core 2.0 to get domain user group information and it works well in IIS. I installed theSystem.DirectoryServices 4.5.0-preview2-26202-05 via Nuget in the project. But when i use the same code deploy on ubuntu 14.04, it throws exception "System.DirectoryServices is not supported on this platform." Is that possible to work well in Ubuntu ? if not any third part LDAP library provide and can work well in Ubuntu? The purpose is to get the domain user information and the hosted Ubuntu server is joined the company domain network.
asp.net core code see below
UserController.cs
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.Net.Http;
using System.Security.Principal;
@coolrz commented on Wed Feb 07 2018
Issue Title
System.DirectoryServices is not supported on Ubuntu 14.04
General
I use the .net core 2.0 to get domain user group information and it works well in IIS. I installed theSystem.DirectoryServices 4.5.0-preview2-26202-05 via Nuget in the project. But when i use the same code deploy on ubuntu 14.04, it throws exception "System.DirectoryServices is not supported on this platform." Is that possible to work well in Ubuntu ? if not any third part LDAP library provide and can work well in Ubuntu? The purpose is to get the domain user information and the hosted Ubuntu server is joined the company domain network.
asp.net core code see below
UserController.cs
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.Net.Http;
using System.Security.Principal;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace IsupportESOApi
{
[Route("api/[controller]")]
public class UserController : Controller
{
IList groups = new List();
// GET: api/user/steven.rui.zhang
[HttpGet("{eid}")]
public IActionResult Get(string eid)
{
try
{
DirectorySearcher ds = new DirectorySearcher();
ds.Filter = String.Format("(&(objectClass=user)(sAMAccountName={0}))", eid);
SearchResult sr = ds.FindOne();
}
The text was updated successfully, but these errors were encountered: