Solved

Using Managed Code in InfoPath 2007

Posted on 2008-10-24
2
956 Views
Last Modified: 2013-12-14
I have a fully trusted browser-based InfoPath 2007 form with C# code on the loading event to pull user information from Active Directory which I then populates some form fields.  If I preview the form on my local machine everything works fine.  When I upload to the server as an admin in Central Admin, the fields no longer populate for any user loading the form.  Any ideas on what I may be missing?

Also,  have a separate form loading event logic to set default values that works fine.  I have the form pointed to a shared folder on the server with the actual code.
0
Comment
Question by:bkv1997
2 Comments
 
LVL 28

Accepted Solution

by:
clayfox earned 500 total points
Comment Utility
I would recommend using a web service to get AD info, then you do not have to hassle with code and full-trust. qdabra.com has one prebuilt as an example.

You would need to give the account that is runing the code in IPFS permision to query AD. The user credentials would not be used but the hosting server's.
0
 

Author Comment

by:bkv1997
Comment Utility
It was a permissions issue.  I supplied the account name and password as a parameter to the DirectoryEntry constructor, and that took care of it.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now