Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Help Encrypting the connection stringHelp Encrypting the connection string
Previous
 
Next
New Post
1/23/2006 6:43 AM
 
Hi, i'm setting up DNN 3.2.2 on SQL Server 2005...

I decided to use DPAPI to encrypt my connection string.

Got a DPAPI dll and referenced it, i'm using the machine store to manage the encryption keys, though that is most likely irrelevant to my problem.

I Found the "connection string reader" in (DNNPath)\Components\Upgrade\config.vb and placed some logic there to:

    1    -    check if the connection string is encrypted
    1.1 -    if so, encrypt and save the connection string
    2    -    decrypt the connection string and pass it up as usual

I tested the logic, wich works... Encrypts, decrypts and saves the new string properly. GetConnectionString  in config.vb returns the connection string correctly decrypted. But then the portal stops working.

I'm getting a :

"Format of the initialization string does not conform to specification starting at index 0."

error in :

(DNNPath)\components\Users\UserController.vb

Line 409: ' Sets all profile properties in Hashtable.
Line 410: For Each o As AspNetProfile.SettingsProperty In AspNetProfile.ProfileBase.Properties
Line 411:     u.ProfileProperties.Add(o.Name, objProfile.Item(o.Name))
Line 412: Next
Line 413: Return u

If i disable the decryption and restore a regular connection string to web.config DNN resumes working normally.

I guess i'm missing some place that reads the encrypted connection string and, since not decrypting it there, it fails to recongnize it. But i'm lost as to where that can be...

Insights anyone?

Thanks in advance

PS- wouldn't this  be a nice default beahaviour?  Making DNN encrypt the connection string (machine dependant encryption keys) first chance it gets... or is there some issue i'm not aware of?
 
New Post
1/23/2006 8:18 AM
 

what version of DNN are you using, DNN 4.x has 2 connection strings, one is there to preserve legacy versions, perhaps that's the issue.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/23/2006 8:59 AM
 
Forgot that!!

I'm using 3.2.2, with Sql Server.
 
New Post
1/24/2006 11:18 AM
 
I dug some more on this and the object breaking is objProfile, an instance of Microsoft.ScalableHosting.Profile.ProfileBase in MemberRole.dll

Being everything equal to a working DNN, except for the connection string stored in web.config, i'm left to speculate that MemberRole.dll goes out to read the connection string on it's own, thus bypassing my decryption routine.

If this is so, what can i do about it?
 
New Post
1/24/2006 11:26 AM
 
I can't believe i didn't check this before!!!!

Right out of web.config:

<add name="AspNetSqlProvider" type="DotNetNuke.Users.Profile.DNNSQLProfileProvider, DNNSQLProfileProvider" connectionStringName="SiteSqlServer" applicationName="/" description="Stores and retrieves profile data from the local Microsoft SQL Server database" />

and it's obvious that MemberRole.dll does go on it's own to read the connection string.

But this means i can't encrypt the connection string because MemberRole.dll doesn't know how to decrypt it and i can't teach it...

Can this be circumvented?
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Help Encrypting the connection stringHelp Encrypting the connection string


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out