hello,
i have problems with this code:
IXMLDOMNode BenutzerName = thisXDocument.DOM.selectSingleNode("my:meineFelder/my:Kopf/my:Name");
IXMLDOMNode BenutzerAbteilung = thisXDocument.DOM.selectSingleNode("my:meineFelder/my:Kopf/my:Abteilung");
string m_strLDAPPath = "LDAP://DC=class,DC=sps";
if(BenutzerName.text == "")
{
BenutzerName.text = System.Environment.UserName;
try
{
DirectoryEntry de = new DirectoryEntry(m_strLDAPPath,"Administrator","Password", AuthenticationTypes.Secure | AuthenticationTypes.ServerBind);
DirectorySearcher src = new DirectorySearcher("(Name=" + BenutzerName.text + ")");
src.SearchRoot = de;
src.SearchScope = System.DirectoryServices.SearchScope.Subtree;
SearchResult res = src.FindOne();
BenutzerAbteilung.text = res.Properties["department"][0].ToString();
EmailAntragsteller.text = res.Properties["mail"][0].ToString();
}
catch
{
thisXDocument.UI.Alert("Laden der Abteilung fehlgeschlagen!");
}
}
else
{
return;
}
i wrote in an other thread that this doesen`t function. now i hope someone can help me with the code i wrote. it loads in the onload function and works fine with the administrator. i can get the active-user-name by System.Environment.UserName and with the as filter, i can get the department and mail from the admin. but if a normal user trys to load the form, the form loads and the user must wait a moment (the admin don`t need to wait). after some seconds the user gets the error i wrote in the catch-case. i don`t know what the problem is. the form has full trust and is based in a sharepoint-library. is this a security problem from the other user? if i try with a other user who has also admin-rights, the problem is the same ... so i thing it`s no trust problem ...... ???????
who can help me?