I deployed a web site in AppHarbor which uses a MS SQL database. AppHarbor provides me with a connection string which I entered in settings.txt
and it seems to work fine BUT AppHarbor suggests to use the SQLSERVER_CONNECTION_STRING
variable instead.
That is because the connection string may change without notice so the only safe way is to use the variable mentioned.
Accessing the configuration variables below should be done programatically, as the values may be updated by the add-on provider without notice.
Is there a way to override the DataConnectionString
setting from settings.txt
and set the application to use the SQLSERVER_CONNECTION_STRING
variable instead? I assume AppHarbor somehow sets those variables as appSettings.
P.S. This is my first application with Orchard, I am not proficient with this CMS.
shellSettings.DataConnectionString = ConfigurationManager.AppSettings["SQLSERVER_CONNECTION_STRING"] ?? value;
– Perforate