Once you have defined your configuration file, you create a user and password for that configuration. The user and password allow you to control access to the map data from the mobile client.
MMW Service uses a SQL Server Compact Edition Database file called 'mmw-sdk.sdf' that is stored in .\services\mmw-service\service\database. In this database you store each username and password, location of each configuration file, and the association of users to configurations.
A helpful tool for editing your database file is SQL Server Compact Toolbox 4.0, which can be downloaded free of charge from http://sqlcetoolbox.codeplex.com/releases/view/104096, as well as other sites on the web. You can place the executable anywhere you want on your system.
Using SqlCe40Toolbox.exe, connect to the 'mmw-sdk.sdf' file using the Add SQL Server Compact 4.0 Connection command. Expand the mmw-sdk.sfd node of the tree view to display the database tables.
Right click on the 'Users' table and select 'Edit Top 200 Rows' to display the users table. Add a new record, and then type the appropriate user name in the 'Name' field. In the 'Salt' field, type the string used for generating encrypted password. In the 'Password' field, type a sha256 encrypted plain text password with salt string at the beginning (e.g. if salt is '123', and you want to set password 'test', then sha256 should be generated for '123test'. Encrypted password will be: 'a8327d4a49d4631631d090a72297d8d749337a30e6eb0416bd3655b71e36481b'). You can generate the encrypted password using http://www.sha1-online.com. After you type the appropriate user name, salt and encrypted password string, select the 'Save' to apply your changes. Then click 'Reload' command and the 'Id' field is populate automatically.
For each configuration file you define, you will need to add a record to the 'Configurations' table to identify its location. Select the 'Configurations' table in the tree view, then right click and select 'Edit Top 200 Rows' to display the 'Configurations' table. Using the same workflow as before, add a new record and then type the configuration name in the 'Name' field and a path to the configuration path in the 'Url' field. As before, use the 'Save' command to apply your edits, and then use the 'Reload' command to update the 'Id' field.
The next step is to associate users with configurations. This allows you to control who has access to your data through the mobile app. Select the 'UserConfigurations' table in the tree view, then right click and select 'Edit Top 200 Rows' to display the 'UserConfigurations' table. Add a new record and type the 'User_Id' (from 'Users' table) for the appropriate user and the 'Configuration_Id' (from 'Configurations' table) for the appropriate configuration, and then click 'Save' and 'Reload' to apply the edits.
When you use the mobile app, you specify the URL to the service (http://<server name>/mmwsdk) , and you are prompted to type a username and password. Once the username and password are authenticated, the map on the mobile device is populated based on the content of the configuration file associated with that user.