I have a ClickOnce application that will be used by two clients (multiple users each). Application connects to MSSQL/MySQL. How can I supply them different connectionString with one ClickOnce deployment?
I’d really like to keep things (as much as possible) simple on my end (and have single publish point), but how can I give them different settings?
One idea is not to give them connectionString at all, and enable application to choose server, db and username/password, then save it into userSettings.
Another idea (that I’m not very fond of) is to intercept on IIS http request for app.exe.config.deploy file and rewrite it with appropriate settings for each client.
Can this be done, err, humanely?
For starters, everyone using ClickOnce should follow RobinDotNet’s blog – http://robindotnet.wordpress.com
There I found link to How to: Retrieve Query String Information in a ClickOnce Application on MSDN.
Each of my clients will install app via link to .application that will contain their identifier (probably GUID). On first launch, I’ll save that identifier to settings. I’ll create a web service that will keep settings for all clients and track them via their identifier.