> Have you tried naming it INFOPATH.EXE.CONFIG.
When adding a data connection (in this case a config.xml file), InfoPath asks you, at the last step, if you want this file included as part of the form. I haven't tried it myself, but I believe that if you say "No", that it will use a hard-coded full path to that resource.
My assumption (not having tried this) is that if the resource is hosted on a server, as long as the other users have the same path access to that stored location that the config.xml file does not need to be part of the XSN and can still be accessed.
If you play with this, please post your findings as I haven't had time to try it, but am currious if it works as I expect.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
"Andrew Ma [MSFT]" wrote:
> Have you tried naming it INFOPATH.EXE.CONFIG.
and "Matthew Blain (Serriform)" wrote:
> Check the value of
> AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.
I've checked that value; it was:
@"C:\Program Files\Microsoft Office\OFFICE11\INFOPATH.EXE.config"
So you're right. It's probably not the way I want to proceed... -Although it works fine and I might use it anyway :-)
Using a secondary data source isn't the right solution for me as well, because when I publish my form (which is fully trusted btw) it will become part of the xsn-file and this is not what I want either...
Matthew Blain \(Serriform\) - 13 Jul 2004 22:35 GMT
Yes, it works just fine. If you have it on an HTTP server, it will even be
loaded from the wininet cache and sometimes work offline. (Also sometimes
get out of date if you're editing the file, but that's a rare and
understandable case.)
I wish InfoPath let you have controled caching of secondary data sources
such as config files, as this is a very common scenario.
--Matthew Blain
http://tips.serriform.com/
When adding a data connection (in this case a config.xml file), InfoPath
asks you, at the last step, if you want this file included as part of the
form. I haven't tried it myself, but I believe that if you say "No", that it
will use a hard-coded full path to that resource.
My assumption (not having tried this) is that if the resource is hosted on a
server, as long as the other users have the same path access to that stored
location that the config.xml file does not need to be part of the XSN and
can still be accessed.
If you play with this, please post your findings as I haven't had time to
try it, but am currious if it works as I expect.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
"Andrew Ma [MSFT]" wrote:
> Have you tried naming it INFOPATH.EXE.CONFIG.
and "Matthew Blain (Serriform)" wrote:
> Check the value of
> AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.
I've checked that value; it was:
@"C:\Program Files\Microsoft Office\OFFICE11\INFOPATH.EXE.config"
So you're right. It's probably not the way I want to proceed... -Although it
works fine and I might use it anyway :-)
Using a secondary data source isn't the right solution for me as well,
because when I publish my form (which is fully trusted btw) it will become
part of the xsn-file and this is not what I want either...
StefanO-nl - 14 Jul 2004 10:38 GMT
> When adding a data connection (in this case a config.xml file),
> InfoPath asks you, at the last step, if you want this file included
> as part of the form.
Yes, when the secondary datasource isn't a resource file yet, you will be asked if you want to include this file as part of the form and when you say Yes, it will become a resource file.
It works fine using the config.xml as a resource file. It also works if you don't use a resource file but a hard coded path (saying No when asked to include the file as part of the form).
The con of this solution however is that this folder must exist on every client PC. If InfoPath can't find the file, it will display this errormessage:
The following DataObject either cannot be created or cannot be initialized: Config
The query cannot be run for the following DataObject: Config
InfoPath cannot run the specified query.
InfoPath cannot open the following file: Config.xml.
The system cannot find the file specified.
This error is shown both when I remove the resource file (in the first scenario) as well as when I remove the full path in the manifest.xsf (in the second scenario). I've tried several folders for my config.xml-file (same as the xsn-file, c:\program files\microsoft office\office11), but I keep getting this error.
And even if I would solve this problem of finding out what the folder config.xml must be, I have another problem: The error is before the OnLoad-event and therefore can't be catched to show a user friendly error dialog...
I'd expect more support of InfoPath for config-files.
Matthew Blain \(Serriform\) - 14 Jul 2004 21:42 GMT
Where is the XSN stored?
> > When adding a data connection (in this case a config.xml file),
> > InfoPath asks you, at the last step, if you want this file included
> > as part of the form.
>
> Yes, when the secondary datasource isn't a resource file yet, you will be asked if you want to include this file as part of the form and when you say
Yes, it will become a resource file.
> It works fine using the config.xml as a resource file. It also works if you don't use a resource file but a hard coded path (saying No when asked to
include the file as part of the form).
> The con of this solution however is that this folder must exist on every client PC. If InfoPath can't find the file, it will display this
errormessage:
> The following DataObject either cannot be created or cannot be initialized: Config
> The query cannot be run for the following DataObject: Config
[quoted text clipped - 3 lines]
>
> This error is shown both when I remove the resource file (in the first scenario) as well as when I remove the full path in the manifest.xsf (in the
second scenario). I've tried several folders for my config.xml-file (same as
the xsn-file, c:\program files\microsoft office\office11), but I keep
getting this error.
> And even if I would solve this problem of finding out what the folder config.xml must be, I have another problem: The error is before the
OnLoad-event and therefore can't be catched to show a user friendly error
dialog...
> I'd expect more support of InfoPath for config-files.
StefanO-nl - 16 Jul 2004 13:40 GMT
Local file system of the end user, so it could be different for every client.
"Matthew Blain (Serriform)" wrote:
> Where is the XSN stored?
>
[quoted text clipped - 32 lines]
> >
> > I'd expect more support of InfoPath for config-files.
Matthew Blain \(Serriform\) - 16 Jul 2004 19:27 GMT
How does the form get onto the user's machine? Will each user have a
different config file? If it's a fully trusted form, you could specify any
location you wanted to for a config file. If it's not, what you can do is
limited.
> Local file system of the end user, so it could be different for every client.
>
[quoted text clipped - 36 lines]
> > >
> > > I'd expect more support of InfoPath for config-files.