Can't Encrypt database.config connection string

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
kittruong
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Tue Feb 22, 2005 2:31 pm

Can't Encrypt database.config connection string

Post by kittruong » Mon Jul 30, 2012 8:45 pm

Currently managing several installations of AC 7.x. I have this one installation in which I can't encrypt the database.config connection string.

No error message, I check "Encrypt the connection string in..." and hit "CHANGE" and it says it updated. The database.config file is modified but the encryption is not there.

Encrypted file looks like this:
<connectionStrings>
<add name="AbleCommerce" connectionString="Server=XXX;Database=XXX;Uid=XXX;Pwd=XXX;" providerName="System.Data.SqlClient" />
</connectionStrings>

Unencrypted file looks like this:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="AbleCommerce" connectionString="Server=XXX;Database=XXX;Uid=XXX;Pwd=XXX;"
providerName="System.Data.SqlClient" />
</connectionStrings>

What gives?

User avatar
dgoranov
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Sun Jan 16, 2011 3:58 pm
Location: Boston, MA
Contact:

Re: Can't Encrypt database.config connection string

Post by dgoranov » Tue Jul 31, 2012 10:17 am

Make sure you have a valid machineKey entry in the web.config file. I have not seen this issue, but this could be one of the reasons. Machinekey can be
generated using this link: http://aspnetresources.com/tools/machineKey
Dimi Goranov
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140

sofaking
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Tue Jul 31, 2012 11:26 am

Re: Can't Encrypt database.config connection string

Post by sofaking » Tue Jul 31, 2012 11:51 am

I am also encountering this issue.

Putting a machinekey entry in the web.config did not work.

Also, I currently manage another site and they do not have a machinekey entry in the web.config but the database.config file is able to encrypt.

sofaking
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Tue Jul 31, 2012 11:26 am

Re: Can't Encrypt database.config connection string

Post by sofaking » Tue Jul 31, 2012 12:37 pm

Not sure if this is an AbleCommerce bug or not, but was able to manually encrypt the database.config from notes here:

viewtopic.php?f=42&t=5747&p=23126&hilit ... ing#p23126

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Can't Encrypt database.config connection string

Post by jmestep » Tue Jul 31, 2012 5:07 pm

Did you check the file date on your database.config file to make sure the file changed? If not, it might be a permissions issue.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply