How can I encrypt a connect string for AbleCommerce Gold R2?
How can I encrypt a connect string for AbleCommerce Gold R2?
How do I create a new encrypted connection string with AbleCommerce Gold R2? For instance, when the database password changes, how would I create a new <CipherValue> for the database.config file? Thanks.
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: How can I encrypt a connect string for AbleCommerce Gold R2?
If it is possible, update the connection string via the AbleCommerce admin interface immediately before you change the password on the database. That way when you update the database password AC will spring back to life. If it is not possible, then there are two options:
1) Manually decrypt the connection string section of web.config, update the password in the database.config file, then reencrypt connection strings with aspnet_regiis.exe. (See http://msdn.microsoft.com/en-us/library ... .100).aspx)
2) Wipe out the database.config with a new plain text content, providing the correct connection string for your database:
Then once you log in to AbleCommerce admin, you can go visit the connection strings settings and choose update to re-encrypt.
Note that AbleCommerce can only encrypt connection strings when it is running in Full trust. If you are in partial trust modes, the only way to encrypt/decrypt is to use the aspnet_regiis tool.
1) Manually decrypt the connection string section of web.config, update the password in the database.config file, then reencrypt connection strings with aspnet_regiis.exe. (See http://msdn.microsoft.com/en-us/library ... .100).aspx)
2) Wipe out the database.config with a new plain text content, providing the correct connection string for your database:
Code: Select all
<connectionStrings>
<add name="AbleCommerce" connectionString="Data Source=SERVER;Initial Catalog=DATABASE;User Id=USER;Password=PASSWORD;" providerName="System.Data.SqlClient" />
</connectionStrings>
Note that AbleCommerce can only encrypt connection strings when it is running in Full trust. If you are in partial trust modes, the only way to encrypt/decrypt is to use the aspnet_regiis tool.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.