나는 ADAM 설정이 & 나는 등 새로운 사용자를 추가하는 등 관리 작업을 수행하는 웹 서비스를 작성했습니다 (I가 동일한 ADAM 인스턴스를 사용하는 여러 응용 프로그램을)ADAM - 응용 프로그램 별 특성을 "저장"할 수있는 방법이 있습니까?
내가 아마 사운드를 달성하기 위해 노력하고 약간 이상하지만 기본적으로 관리자 사용자가 웹 서비스가 ADAM에서 반환해야하는 특성을 선택할 수 있기를 원합니다. 예 : 응용 프로그램 1은 displayName & telephoneNumber를 반환해야하지만 응용 프로그램 2에는 반환되는 동일한 속성이 필요하지 않을 수 있습니다.
현재 사용자가 선택한 특성을 저장하기 위해 SQL Server 테이블을 설정했습니다. & 웹 서비스에서 필요한 속성을로드하고 반환 할 배열에 결과를 추가하기 위해 루프를 반복합니다 (If 당신의 관심을 끌기 위해 하단에 코드를 추가 할 것입니다.)
이 작업을 수행하는 더 좋은 방법이 있는지 알고 싶었습니까? ADAM 자체에 이와 같은 것을 저장할 수 있습니까?
미리 도움을 청하십시오!
//using linq to access table
DataClasses1DataContext db = new DataClasses1DataContext();
var queryAttributes = from atr in db.AttributesToReturns
where atr.appNumber == appNumber
select atr;
ArrayList userD = new ArrayList();
foreach (var a in queryAttributes)
{
//the col 'attribute' contains the exact name in active direct e.g. displayName
string att = a.attribute.ToString();
searcher.PropertiesToLoad.Add(att);
}
//--code omitted but here perform search & get req Directory Entry
foreach (var a in queryAttributes)
{
string attributeName = a.attribute.ToString();
try
{
string value = user.Properties[attributeName].Value.ToString();
//do something with value - here i am updating a user object which will be added to the ArrayList the webservice is returning
updateUser(u, attributeName, value);
}
//if an error - just set value to empty
catch (Exception ex)
{
string value = "NULL";
updateUser(u, attributeName, value);
}
}
userD.Add(u);
남자를 작동합니다을 확장 할 수는 분명이 나에게 특별히 결국 :( –