If you are using one of the iotQi supported devices for Windows 10 IoT Core (WinIoT), you have the option to store configuration items (primarily the connection string) on the device's SD card.  This is not mandatory, you can place the connection string in your source code.  But, if you place configuration items on the SD card, this allows you to change them or simplify the process of provisioning of multiple devices. Currently iotQi supports the Raspberry PI 2, Raspberry PI 3, and the DragonBoard 410C. 


WinIoT File System

The file system on a Windows 10 IoT device has both similarities and differences from a Windows PC file system; if you have worked with file explorer much you will quickly see this.  This guide won't cover the file system in detail, we are just pointing out there are unique patterns when placing files associated with your application.

When your Windows IoT device is running, you can access its file system remotely using Windows File Explorer.  The easiest way to access your device's file system is from within Windows 10 IoT Core Dashboard (you can download it here).  With you device online, on your network, find your device and right-click for a context menu as shown below, then choose Open network share.  Once launched and following a 5-10 second delay, you will need to login to your device as administrator and then you will see a File Explorer window with your device's file system open.




Each application has a set of folders associated with it.  One of those folders is accessible from the WinIoT application for storage of configuration and other persistent data: LocalState. The image below shows this path from within a File Explorer window.  The application's folder is actually named using its PackageFullName, which is your solution configured name with an alphanumeric suffix (see below).



From the root of your device, navigate to...

\Data\Users\DefaultAccount\AppData\Local\Packages



iotQi Configuration File

Inside your application's LocalState folder is where you can optionally place your iotqi-config.json file with your connection string (future iotQi settings will go here too). As you most likely guessed, this is a text file containing JSON configuration settings. 




Text Version
{"iotqi-configuration": {"connectionstring": "<yourConnectionString_from_iotQi_Setup>"}}


You are free to add additional settings to the iotQi configuration file.  If you do, please create a separate root property (separate object at the same level as "iotqi-configuration") to host your settings as shown above.