Encrypt connection string in the database.config not workin

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
mbartens
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 107
Joined: Mon Mar 09, 2015 3:34 am

Encrypt connection string in the database.config not workin

Post by mbartens » Wed Sep 16, 2015 2:47 am

Hi
I just installed AbleComm on our Prod server and all went well except the database.config is not encrypted.
In the admin I went to Configure --> Security --> Database. I checked box boxes and clicked change. The date on the database.config file changed but it's still not encrypted.
Please advise. Thank you
May

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Encrypt connection string in the database.config not workin

Post by mazhar » Wed Sep 16, 2015 3:59 am

It seems like you are running under medium trust. This operation needs permissions which are available under full trust. If you have the control over trust configuration then try placing your install under Full Trust and then save the connection string.

mbartens
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 107
Joined: Mon Mar 09, 2015 3:34 am

Re: Encrypt connection string in the database.config not workin

Post by mbartens » Wed Sep 16, 2015 4:46 am

I'm not totally up to speed on trusts... can I just change the permissions on a directory or file ? If so what directory?
May

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Encrypt connection string in the database.config not workin

Post by mazhar » Wed Sep 16, 2015 5:00 am

If its hosted server then perhaps you should ask your host if they allow full trust and configure it for your website. If its your own server and you have control over IIS then you can either do it on IIS or in your web.config.

Here is the web.config way. Please backup your web.config file, then edit your web.config and locate following code line

Code: Select all

<system.web>
and then update it like

Code: Select all

<system.web>
<trust level="Full" />

mbartens
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 107
Joined: Mon Mar 09, 2015 3:34 am

Re: Encrypt connection string in the database.config not workin

Post by mbartens » Wed Sep 16, 2015 7:23 am

Thank you. So far changing the Web.Config did not work. I guess a setting in IIS can override the Web.config? I'll try to get access to look at that.
Once I get the database.config encrypted can I then I turn back the trust to what it was? Thanks.
May

mbartens
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 107
Joined: Mon Mar 09, 2015 3:34 am

Re: Encrypt connection string in the database.config not workin

Post by mbartens » Wed Sep 16, 2015 10:09 am

I changed the settings in IIS but no luck. I was told that the database.config file is encrypted upon installation and the only way it could become clear text would be if someone opened up the database.config and updated it. I know I didn't do it.
Has anyone experienced an issue with not being able to get the database.config encrypted? It's on a Windows 2012 server.
May

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: Encrypt connection string in the database.config not workin

Post by jguengerich » Thu Sep 17, 2015 4:32 am

This thread: viewtopic.php?f=42&t=5747&start=0 has a post by Logan about encrypting/decrypting from the command line. It's for .NET 2, but you should be able to find similar instructions for .NET 4. Not really a solution or answer to why it isn't working for you, but more of a possible workaround.
Jay

Post Reply