infopath forms services and app.config - InfoPath Dev
in

InfoPath Dev

infopath forms services and app.config

Last post 08-10-2010 02:13 AM by imransulehri. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-30-2006 05:36 PM

    • XOR
    • Not Ranked
    • Joined on 11-28-2006
    • Posts 3

    infopath forms services and app.config

    hi guys

    does anyone know if you can deploy other files with your xsn when you publish to infopath forms services? eg: app.config file for dynamically changing settings in the code of the form.

    Cheers!
  • 12-07-2006 08:04 AM In reply to

    Re: infopath forms services and app.config

    Hello Exclusive OR,

    You cannot do this directly like you can with other .NET applications, but you should be able to accomplish the same thing by adding an XML Document as a secondary data source.

    1. Go to tools -> Data Connections -> Add
    2. Recieve, Xml Document, filepath, Finish
    3. A dialog will pop up asking whether you would like to add the file to the form template. Click NO.

    Now the template references this file from wherever it is deployed. You can change values inside this XML file whenver you like and the next time the template is opened it will see these changes. You will probably want to put the config XML file in a network accessible folder.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-07-2006 04:11 PM In reply to

    • XOR
    • Not Ranked
    • Joined on 11-28-2006
    • Posts 3

    Re: infopath forms services and app.config

    thanks matt
  • 09-19-2007 03:10 AM In reply to

    Re: infopath forms services and app.config

    You mention that you use forms services. If you use InfoPath 2007 on MOSS you have a far better alternative: use UDC files in Data Connection Libraries.

    The UDC file is an XML file so it is easy to edit when you for example move from development to production environment.

     More info on data connections and UDC files:

    http://blogs.msdn.com/infopath/archive/2006/10/02/Data-Connections-in-Browser-Forms.aspx


    http://blogs.msdn.com/infopath/archive/2006/10/05/Where-do-UDC-files-come-from_3F00_.aspx

    hth

    AndersR

  • 08-10-2010 02:13 AM In reply to

    Re: infopath forms services and app.config

    Hello, i faced the same problem. I am amazed why microsoft didn't provide a way to do this. All what we are doing is work around. I used the method as suggested by Matt Faus above with alteration that i can't put the xml file in shared location. Once the infopath template is installed then there is need to changed the webservice url which infopath uses to talk to webservice to do various things. What i end up is add xml file as data source and in template code behind i acess the value of this data source node e.g DataSources["configuration"].QueryConnection.Execute(); url= DataSources["configuration"].CreateNavigator().SelectSingleNode("/configuration/appSettings/add/@value", NamespaceManager).Value; to change url i have configuration tool which unzips the infopath template change the configuration.xml pack and sign it back. Isnt very comfortable way but seems to be only way.by the way i am not using infopath webforms instead is infopath template which client will open using infopath from his local machine and is deployed to server. Imran
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.