Solved

Using Managed Code in InfoPath 2007

Posted on 2008-10-24
2
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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: …
Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
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.

717 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