Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Decrypt Connection String in DBUtils
 

Pages: 1
LLBLGen Pro Runtime Framework
Decrypt Connection String in DBUtils
Page:1/1 

  Print all messages in this thread  
Poster Message
PhilipleGrange
User



Location:
Johannesburg, South Africa
Joined on:
17-Aug-2005 20:28:58
Posted:
31 posts
# Posted on: 27-May-2008 13:01:30.  
Hi,

I want to know if it is possible to encrypt my "Main.Connectionstring" in the Web/App.Config and then decrypt it in the DBUtils code. When I generate the new classes it overwrites my decryption.

We have a client that insist we have encrypted details in the Web/App.Config file.

Any suggestions?

Best regards,

Philip
  Top
goose
User



Location:
Central America
Joined on:
06-Aug-2007 18:21:05
Posted:
385 posts
# Posted on: 27-May-2008 19:40:50.  
Make all your modifications to DBUtils code in a partial class to avoid loosing your changes when generating new classes.



gansodesoya  Top
PhilipleGrange
User



Location:
Johannesburg, South Africa
Joined on:
17-Aug-2005 20:28:58
Posted:
31 posts
# Posted on: 28-May-2008 11:08:49.  
Goose,

I still need to make code changes to the DBUtils to be backwards compatible.

Any samples?

Regards,

Philip
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14495 posts
# Posted on: 28-May-2008 14:59:17.  
Similar discussions:
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=908
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=3906


  Top
PhilipleGrange
User



Location:
Johannesburg, South Africa
Joined on:
17-Aug-2005 20:28:58
Posted:
31 posts
# Posted on: 02-Jun-2008 09:39:36.  
Hi Walaa,

Thanks for the links but I need to know how to change the DBUtils class to accommodate my changes and not to override when I re-generate the code.

Unfortunately I'm on a very tight deadline and cannot research myself.

Thanks,

Philip
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14495 posts
# Posted on: 02-Jun-2008 10:02:12.  
The fastest easiest solution is to use an external class/method to handle the decryption outside the dbUtils, and set the DbUtils.ActualConnectionString with the decrypted value.

Otherwise if you want to execute the decryption from within the DBUtils class, then you may modify the dbUtils.template, found at
<LLBLGen installation folder>\Templates\SqlServerSpecific\Net2.x\C#
If you are using SQLServer for example.

You should modify the CreateConnection method. So that whenever you re-generate the code the decryption code get generated too.

Also it might be better if you copy the dbUtils.template into a new file with another name and add your modifications there then use it in the Designer instead of the original dbUtils.template, this should keep the original template intact in case you want to revert back to it, or use it in another project.


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.