Solved

Using Managed Code in InfoPath 2007

Posted on 2008-10-24
2
957 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
ID: 22797624
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
ID: 22833864
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

920 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

16 Experts available now in Live!

Get 1:1 Help Now