<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10696.aspx</link><pubDate>Thu, 30 Nov 2006 00:44:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10696</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10696.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10696</wfw:commentRss><description>We are about ready to start a free isntall campaign where we will be giving our AD web service away for free as part of the more significant Qdabra Database Accelerator Suite. The suite will include numerous articles on how to create InfoPath solutions and integrate with SQL Database and Active Directory without writing any code. &lt;br /&gt;&lt;br /&gt;Watch here for a release announcement in the next 3-4 weeks.</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10695.aspx</link><pubDate>Wed, 29 Nov 2006 10:24:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10695</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10695.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10695</wfw:commentRss><description>You are absolutely right Patrick. &lt;br /&gt;If you use the code with a WebService you could at least store the LDAP string in the config file and read it from there to be at least somehow a bit dynamic.&lt;br /&gt;By the way finally got "your" book "Developing Solutions with InfoPath". Nice piece of paper. I guess it would have helped me a lot when I started working with InfoPath but I guess it still will.</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10694.aspx</link><pubDate>Wed, 29 Nov 2006 08:22:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10694</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10694.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10694</wfw:commentRss><description>Thanks again Nukkumatti for the excellent post! Aside from Full Trust and potential security or hardcoding issues encoding the the LDAP string in code, I generally tell people to minimize the code in their solution since that will make them less costly to maintain longterm.</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10693.aspx</link><pubDate>Wed, 29 Nov 2006 07:18:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10693</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10693.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10693</wfw:commentRss><description>Hey Linus,&lt;br /&gt;&lt;br /&gt;first install the InfoPath toolkit for Visual Studio that you can use managed code for you InfoPath projects. Then put this into the OnLoad event of your form to get the currently logged on users name form AD. &lt;br /&gt;&lt;br /&gt;NOTE: This requires to set your form to full trust level.&lt;br /&gt;If you don't want to do so use the code with a WebService.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IXMLDOMNode name	  = thisXDocument.DOM.selectSingleNode("my:myFields/my:name");&lt;br /&gt;				try&lt;br /&gt;				{&lt;br /&gt;					string user = System.Environment.UserName;&lt;br /&gt;				&lt;br /&gt;					// Create a directory searcher on the path provided when created the instance&lt;br /&gt;					DirectoryEntry entry		= new DirectoryEntry("LDAP://OU= ,DC=,DC=,DC=");&lt;br /&gt;					DirectorySearcher searcher	= new DirectorySearcher(entry);&lt;br /&gt;&lt;br /&gt;					string ToFind				= "(SAMAccountName=" + user + ")";&lt;br /&gt;					searcher.Filter				= ToFind;&lt;br /&gt;&lt;br /&gt;					// Try to find the employee &lt;br /&gt;					SearchResult result			= searcher.FindOne();&lt;br /&gt;					if (result != null)&lt;br /&gt;					{&lt;br /&gt;						// Get the 'DirectoryEntry' that corresponds to 'result'.&lt;br /&gt;						DirectoryEntry myDirectoryEntry = 	result.GetDirectoryEntry();&lt;br /&gt;					&lt;br /&gt;						// Get the properties of the 'mySearchResult'.&lt;br /&gt;						ResultPropertyCollection myResultPropColl;&lt;br /&gt;						myResultPropColl	=	result.Properties;&lt;br /&gt;&lt;br /&gt;						foreach(Object myCollection in myResultPropColl["name"])&lt;br /&gt;						{&lt;br /&gt;							PE.text	=	myCollection.ToString();&lt;br /&gt;						}&lt;br /&gt;						name.text = "Name Set";&lt;br /&gt;					}&lt;br /&gt;				}&lt;br /&gt;				catch (Exception ex)&lt;br /&gt;				{&lt;br /&gt;					ex.Message.ToString();&lt;br /&gt;				}&lt;/pre&gt;</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10692.aspx</link><pubDate>Thu, 23 Nov 2006 20:50:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10692</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10692</wfw:commentRss><description>Hi Linus,&lt;br /&gt;If you have AD, then you just need to install the service on one of your web servers where IIS and ASP.NET are already installed. Good luck!</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10691.aspx</link><pubDate>Thu, 23 Nov 2006 07:19:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10691</guid><dc:creator>Linus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10691.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10691</wfw:commentRss><description>Hi guys!&lt;br /&gt;&lt;br /&gt;We already have an AD in our network. Or do I havo to install that service on my local computer?&lt;br /&gt;&lt;br /&gt;Linus</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10690.aspx</link><pubDate>Wed, 22 Nov 2006 19:23:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10690</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10690.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10690</wfw:commentRss><description>Hi Linus,&lt;br /&gt;&lt;br /&gt;Check out these links,&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=612&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=612&lt;/a&gt;&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1677&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1677&lt;/a&gt;&lt;br /&gt;</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10689.aspx</link><pubDate>Wed, 22 Nov 2006 19:18:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10689</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10689.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10689</wfw:commentRss><description>Hi Linus and welcome!&lt;br /&gt;You need to install it first. :) It's $19.95. If you buy it and it doesn't solve your problem, let me know and we'll refund you.</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10688.aspx</link><pubDate>Wed, 22 Nov 2006 14:30:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10688</guid><dc:creator>Linus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10688.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10688</wfw:commentRss><description>Problem!&lt;br /&gt;&lt;br /&gt;I don't know the URL for the ADServices... What could I do to get it?&lt;br /&gt;&lt;br /&gt;greets</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10687.aspx</link><pubDate>Wed, 22 Nov 2006 11:06:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10687</guid><dc:creator>Linus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10687.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10687</wfw:commentRss><description>Yeah, sounds good. I'll give it a try...&lt;br /&gt;&lt;br /&gt;later</description></item><item><title>Re: Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/10686.aspx</link><pubDate>Wed, 22 Nov 2006 10:47:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10686</guid><dc:creator>Suresh Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10686.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10686</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Try out these link &lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=683&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=683&lt;/a&gt;&lt;br /&gt;Hope this will help you</description></item><item><title>Need tremendous help gettin UserName from an AD</title><link>https://www.infopathdev.com:443/forums/thread/5930.aspx</link><pubDate>Wed, 22 Nov 2006 09:03:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5930</guid><dc:creator>Linus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5930.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5930</wfw:commentRss><description>Hey guys!!!&lt;br /&gt;&lt;br /&gt;I'm stucking in dirt like no one before. My Boss told me to create a InfoPath Formular that should include a text fild that shall be filled with the current user's name on load. His words 'This can be done with some c# code' - Blue eyed I said 'Absolutely no prob!' and startet to write some code. As awaited, the c# worked. Then I tried to implement the c# code into the formular, realizing it ain't gonna work that way.&lt;br /&gt;&lt;br /&gt;My first question is: Is it possible to implement c# code into a formular?&lt;br /&gt;&lt;br /&gt;I've no idea about jscript. But I think I'm not the first trying to get the username (Lastname + Forename) so the second question is:&lt;br /&gt;&lt;br /&gt;Do you have a working js code solving my problem? - I didn't find some code or just didn't understand...&lt;br /&gt;&lt;br /&gt;If I can't do this, I'll be dead on monday... 'cause my boss'll be back from vacation that day!!!&lt;br /&gt;&lt;br /&gt;Seriously -&amp;gt; Help!!! ... much!!!&lt;br /&gt;&lt;br /&gt;Greetings from Germany, Sycho Sid</description></item></channel></rss>