Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection string out in the open, encrypting the connec
Message
From
10/08/2007 11:52:42
 
 
To
06/08/2007 15:30:40
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01246255
Message ID:
01247418
Views:
23
This message has been marked as the solution to the initial question of the thread.
I found a way to do this exactly the way I wanted.
Here are the steps required.
1. create your own mmDatabaseManager subclass (see Overriding Factory Methods in help)
2. override the GetConnectionString method
3. paste all the originl code back in (I’m working in VB so I had to convert the code to VB this turnned out to be the hardest part)
4. just ater the second check of mmString.Empty(ConnectionString) conditional (the one that decides if a exception should be thrown) place this line of code
5. ConnectionString = mmEncrypt.DecryptString(ConnectionString, )
6. replace your Key with the Key you want to use for the encryption “hi”, “eatatjoes” whatever as long as it’s the same key you use to encrypt the data.
7. in order to get the original encrypted string top the config file add this to the top of the method
Dim setit As String = mmAppBase.AppSettingsMgr.GetSectionSetting("databases", Me.DatabaseSetKey + databaseKey + "\Connection")
'Debug.WriteLine(mmEncrypt.EncryptString(setit, "hi"))
And set a breakpoint
Run it and step through the code until you debug writ the encrypted string to the debuger and stop.
Copy and paste this into the value section of the connection key.
Remove or remark the lines added in step 7 and your done!
Previous
Reply
Map
View

Click here to load this message in the networking platform