How to hide the infopath code from the users - InfoPath Dev
in

InfoPath Dev

How to hide the infopath code from the users

Last post 05-21-2012 12:21 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-19-2012 01:32 PM

    How to hide the infopath code from the users

    Hi - I have a problem :-) I work in IT department and we want to hide the code in our infopath forms from the user! The reason why is to ensure they do not copy paste the code and the dataconnections. Yeah I know - where is the trust in our users... My experience is that if they can do it - they WILL do it! I have seen some very creative and fancy solutions from the users in infopath. Anyway - we need to hide the code, how to do it? Any ideas?

    We are working in infopath 2010 and the forms are accessed by the users through the browser.

    Thanks :-)

    Filed under: ,
  • 05-19-2012 10:19 PM In reply to

    Re: How to hide the infopath code from the users

    Hello,

     If by "code" you are referring to managed code (C#/VB.NET), then this will not be accessible to users. It exists in published forms in the form of a compiled DLL. What is it about the data connections that you would like to conceal?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-20-2012 01:50 AM In reply to

    Re: How to hide the infopath code from the users

    Well, the big issue is the "standard" dataconnection you set up in the infopath client when developing the form. 

    As far as we can tell this would be open to the users if the open the infopath in the client afterwards. We have around 20 users with the infopath client installed. These users develop infopath forms themselves for their own business units. The setup in our company is that dataconnections are developed by IT. So if a form needs to connect to data (webservice or directly on the database) the form is done by IT. If we develop the form with dataconnection(s) in the infopath client we need to conceal these connections, to prevent the 20 users to copy/paste these connections (WSDLs) and reuse them in other forms. The issue is that we in IT want to know which forms are using our webservices to keep track of load on service cluster and performance. If we suddenly have 10-20 unknows forms using the webservices and generating extreem/extra load... well we have problem.

    Is the solution to develop the form with Visual Studio and managed code all the way? It seems like extra work :-)

    Thx.

  • 05-21-2012 12:21 AM In reply to

    Re: How to hide the infopath code from the users

    You shouldn't replace the data connections with code. You're likely to run into form trust issues if you do that.  One thing that I think you can do is modify the form manifest file to change out the values that you want to conceal from your users, e.g. change the web service URLs to something in the same domain that doesn't go to an actual place.  Then in the form load event, you can use code to set the data connection properties to the correct values so that they are good to go whenever you query them.  Seems a bit like overkill, but if you must do it, I think you have that option.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.