who can test my code? security problem? - InfoPath Dev
in

InfoPath Dev

who can test my code? security problem?

Last post 10-01-2005 12:37 AM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-29-2005 05:15 AM

    who can test my code? security problem?

    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?
  • 09-29-2005 11:12 PM In reply to

    Re: who can test my code? security problem?

    Hey Mephisto,
    Can you put the error in here again? I don't remember the previous thread.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 09-29-2005 11:41 PM In reply to

    Re: who can test my code? security problem?

    hello Patrick Halstead,

    sorry, there is no error ... the users get a alert-window with my own text. this is specified in the "catch"-part of the code .... now if i think about, there is maybe a wrong code?????
  • 10-01-2005 12:37 AM In reply to

    Re: who can test my code? security problem?

    Hi Mephisto,
    Sorry, but I am clueless about your problem.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.