This however failed - the database connection couldn't be read.
In terms of the database I am happy to keep it in the web.config - it was just a simple test to see if/how this might work.
However for other application settings will this work within an Umbraco environment ?
I am in the early stages and so have not yet put together a test user control to try and output a custom setting - this is a logical next step, however thought some constructive feedback from "those who are smarter than me" might assist me in heading down a better path.
I haven't tried this but you might try using <appSettings configSource="config\mycustomconfig.config" />, then duplicating the <appSettings> section there.
This is how I achieve it in the Structure Extensions package and it works like a treat: <StructureExtensions configSource="config\StructureExtensions.config" />
So maybe I should have tried this first before posting, but maybe someone will stumble across this and it will help out when figuring out the best way to record some config settings. I know I could have used this knowledge 2 years ago on a site.
External appsettings / web.config
Hi there
Just seeking some feedback.
I am at the start of a project whereby I am looking to create a prepackaged website solution within Umbraco.
The prepackaged solution will contain a range of configuration settings and I would prefer to keep these outside of the web.config file.
I have just read that you can add a "file" attribute to appSettings - so as a test I tried the following:
I removed the umbracoDbDsn key from web.config and placed in "mycustomconfig.config" as follows:
This however failed - the database connection couldn't be read.
In terms of the database I am happy to keep it in the web.config - it was just a simple test to see if/how this might work.
However for other application settings will this work within an Umbraco environment ?
I am in the early stages and so have not yet put together a test user control to try and output a custom setting - this is a logical next step, however thought some constructive feedback from "those who are smarter than me" might assist me in heading down a better path.
Cheers
Nigel
Hi Nigel,
I haven't tried this but you might try using <appSettings configSource="config\mycustomconfig.config" />, then duplicating the <appSettings> section there.
This is how I achieve it in the Structure Extensions package and it works like a treat: <StructureExtensions configSource="config\StructureExtensions.config" />
More info from google: Using configSource to split configuration files
HTH,
Tom
Hi Tom
Thanks for the lightning fast response - appreciate the input.
Unfortunately "configSource" doesn't seem to work..
I have got it to work using the following:
And then naturally the following worked fine.
So maybe I should have tried this first before posting, but maybe someone will stumble across this and it will help out when figuring out the best way to record some config settings. I know I could have used this knowledge 2 years ago on a site.
Cheers
Nigel
is working on a reply...