New Posts New Posts RSS Feed: Connection String and Environments
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Connection String and Environments

 Post Reply Post Reply
Author
Makani View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Nov-2007
Location: United States
Posts: 7
Post Options Post Options   Quote Makani Quote  Post ReplyReply Direct Link To This Post Topic: Connection String and Environments
    Posted: 15-Nov-2007 at 8:58am
My application currently is two tiers with a Windows client deployed through ClickOnce connecting directly to the database.  I am wondering how to manage connection strings during deployment to different environments and have a couple of questions.
 
Currently the connection string is an embedded resource within the AppHelper assembly.  Is it possible to extract embedded text file from a dll.  Should I encrypt that resource?
 
If I leave the file unencrypted and as an embedded resource how can I allow an administrator to modify the connection string to the appropriat environment.?  Custom config app that builds the AppHelper.dll or maybe just have the admin use the .net compiler, MSBuild? Anyone have code or an example.
 
Thanks,
Mike
 
 
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 15-Nov-2007 at 11:49am
To solve your problem go to the documentation and read about Data Source Keys and the DataSourceKeyResolver.  Instead of using an embbeded (or loose) ibconfig file which contains a static string, you will define a method which will retrieve a connection string.  You can be as resourceful as you want in this method.  The connection string may be embedded in a file or be imported from a Web Service or database.  You can decide to use or not to use encryption.

Edited by davidklitzke - 15-Nov-2007 at 7:22pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down