Page 1 of 1
Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 2:47 am
by mbartens
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
Re: Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 3:59 am
by mazhar
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.
Re: Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 4:46 am
by mbartens
I'm not totally up to speed on trusts... can I just change the permissions on a directory or file ? If so what directory?
Re: Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 5:00 am
by mazhar
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
and then update it like
Code: Select all
<system.web>
<trust level="Full" />
Re: Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 7:23 am
by mbartens
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.
Re: Encrypt connection string in the database.config not workin
Posted: Wed Sep 16, 2015 10:09 am
by mbartens
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.
Re: Encrypt connection string in the database.config not workin
Posted: Thu Sep 17, 2015 4:32 am
by jguengerich
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.