Independant of the question of MSI or of appSettings, how do you _want_ to
distribute the passwords? They have to have _some_ way of getting out to the
client.
Perhaps the following will work:
1) Magically distribute the password to the client program.
2) Have the connection string in appSettings with no password (or with a
password which only works on your development systems)
3) Have the client program get the connection string from appSettings and
have it append "pwd=" & thePassword to the string
4) Open the connection as normal
This allows you to use the designers, specify either no password or a safe
password in appSettings, and then use the deployed password on the deployed
client.
--
John Saunders
Internet Engineer
(E-Mail Removed)
"heikekrieg" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi John,
>
> our application is a client application (with a centralized deployment
> and a msi installer). So we cant outsource the configs cause if the
> network etc. is broken (sometimes this happens :-) ) the client
> application cant work correctly.
>
> We only need a solution like this:
> 1) Work with DataWizard
> 2) DataWizard creates DataAdapter, Connection, Commands etc.
> 3) ConnectionString is taken from DB explorer or mapped to app.config
> (and there only to appSettings).
> 4) If we map to appsettings where do we get our password from (in an
> automatic manner - we dont want to go into source code etc.)
> The problem is that there is no process to set a dynamic
> connectionstring and to encrypt/decrypt the password in the framework.
>
> So what can we do ?
> 1) Dont use the wizard and use a own db framework (that is not well
> cause the wizard has some advantages)
> 2) Write a helper tool that replaces the wizard generated
> connectionstring with a static access like xxx.ConnectionString =
> ConfigSettings.ConnectionString;
>
> I dont understand that there is no solution - there are many projects
> out here and they must have same problems (or they dont use wizard)
>
> Cheers
>
>
>
> "John Saunders" <(E-Mail Removed)> wrote in message
news:<(E-Mail Removed)>...
> > I'm curious. Why not keep the password in the config file? Shared
hosting
> > environment?
> >
> > --
> > John Saunders
> > Internet Engineer
> > (E-Mail Removed)
> >
> >
> > "heikekrieg" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi all,
> > >
> > > i have to load my connectionString from Config dynamically.
> > > We are using many DataAdapters on different Forms and we have to
> > > change from development to production and vice versa.
> > >
> > > The only way to set the connectionString dynamically from app.config
> > > is to set it in the property browser (dynamic settings -
> > > connectionString).
> > >
> > > BUT this entry will only write to the appSettings in the config file.
> > > We dont want to include the password in the appSettings so we want to
> > > have our own configSettingsHandler to read the connectionString from a
> > > class (Serialization).
> > > This is not available cause in the appSettings we can't handle any
> > > entry with a own handler ...
> > >
> > > Any solutions how to solve this problem?
> > >
> > > (Our only solution is to parse all sourcefiles and change the
> > > hardcoded entry from the DataAdapter Wizard into any static access to
> > > a class Classname.ConnectionString....
> > >
> > > Thx all