what approach for client specific conn string?

B

Benoit Martin

I'm developping a windows app that will be sold to different clients. The
app connects to a Database located on my server. That app is installed on
multiple machines for each client.
Each client will have his own database on my server. What would be the best
approach to keep the connection data secure and easily manageable? I don't
want to have the connection string or parameters in the app.config file. One
of my fears is also to give a version to a client with the connection string
for another client giving him access to the wrong DB.
I was thinking that one of the easiest way might be to have their sys admin
enter that info during installation and to store it encrypted in a text
file. Is it a good solution?

How would you go about that?

Thanks

B
 
W

William Ryan

You could store it in the registry as well, encrypted just to be extra safe.
If you really want to make sure that nothing gets mixed up, You could load
the info encrypted in the DB which you could put there at install time.
 
B

Benoit Martin

Thank you for your suggestion,



here is what I've been thinking about doing:




The customer will enter a code during installation. I'll use a module with
all the settings data for each cutomer. The app will go to the appropriate
data using the code that we entered at install time. This code would have to
be stored in the registry or a text file (I think registry is a better
idea). The data will also have to be strongly encrypted to avoid a customer
de-compiling the app and finding out about all the settings of all
customers.

The advantage of this technique is that the only time I have to worry about
making a mistake is when I give out the code to the customer. I should be
able to do that without making any mistakes.



Please let me know what you think about this approach. Any issues (security
etc...) you can see?



PS: I forgot to mention that the number of different customers is more in
the dozen (at most) than the hundreds or thousands.



thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top