Config File

Hi, is there a place that looks like the App.config or Web.config where I can store Key Values in Epicor 10? I want to use it in my dll. I looked in ConfigEditor.exe but it doesn’t give me the option to add keys with values.

What are you trying to accomplish? Generally wouldn’t recommend doing anything like that with a file.

Well I need to store some sensitive informations like client secret or paths that I need to be available in the Dll. @Aaron_Moreng just like this!

1 Like

Custom dll? Could you write your own config for it and deploy that within the client folder?
I think the epicor ones are iffy because they could be overwritten

Since the DLLs are executed in the server folder I was thinking about deploying the config file there.

I would think that would work, but using your own vs. adding to an Epicor generated config file.
Other thing you might have to deal with is on upgrades to the version, those server files get overwritten and I do not know if they preserve any other files in those directories.

Another thing to consider is that if you’re executing this server site, the Server>Customization>Externals directory is designed for custom dll’s and have visibility inside BPMs, so this is where you would want to put your DLL anyways. This directory does not get overwritten during upgrades.

ok good to know! Thanx @Aaron_Moreng

You can actually (pretty safely) add Keys to your epicor web.config

Then read them in your code or BPM

var x =  System.Configuration.ConfigurationSettings.AppSettings["IsProduction"];

Obviously it may get blown away when you re-build / re-deploy.

Thanx! @josecgomez