Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 11-16-2005, 08:42 AM
nukkumatti nukkumatti is offline
Active Directory
Join Date: Nov 2005
Posts: 1
Default Active Directory

Hi, i am quite new to Infopath. I created a form and want to read the current loged in user from an ActiveDirectory and write it to an expression box. But whatever i do i get all the time the same Error Message.

Security error.
at ARF.ARF.OnLoad(DocReturnEvent e)
at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocu mentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)

here is the piece of code i use for the access

string user = System.Environment.UserName;
IXMLDOMNode nodeUser = thisXDocument.DOM.selectSingleNode("my:myFields/my:user");

DirectoryEntry entry1 = new DirectoryEntry("LDAP://PCNAME");
Object obj1 = entry1.NativeObject		
DirectorySearcher searchInitiatorName = new DirectorySearcher(entry1);
searchInitiatorName.Filter = "(sAMAccountName=" + user + ")"
SearchResult result1 = searchInitiatorName.FindOne();
string fullName = result1.Properties["name"][0].ToString();
nodeUser.text = fullName;
Would be really nice if someone could help me out

Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-File Naming/ Default Directory Saves sgill32 Word 2 11-06-2008 02:12 PM
Active Directory ababc Misc 0 09-19-2006 06:18 AM
Newbie - extensions only working in root directory rlcarr71 Misc 0 04-24-2006 07:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:11 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd. is not affiliated with Microsoft