How to customize web.config?

How to customize web.config?


i'm using third party tools that needs some settings on the web.config file. But every time that eSpace is published i lost my settings on the web.config.
Is there anything to keep my settings saved?

Hi Marcos,

You will need to install this component from the forge:

It allows you to make transformations over the web.config file. It' a tricky if you are not used to xslt transformations but here are a couple examples to work with.

Note that the last version is for 8.0. Click on the "See all versions" if you need it for a previous version.

João Rosado
Hi João,

I've installed the version for 7.0 platform server. But when i tried to open the application, i got that error code: Erro 310 (net::ERR_TOO_MANY_REDIRECTS).
Is that a bug? Or maybe something is missing to do?


Those type of errors sometimes happens when there are broken references to the RichWidgets espace.

Did you get any Incompatible reference warning during publication?
You can try to open the FactoryConfiguration eSpace in Service Studio and refresh all references.

Btw, found this topic explaining how to use the Component:

João Rosado
Hi again,

I just compared the 7.0 and 8.0 versions and I see the cause of your redirect problem.

In the Login screen the condition of the If needs to be:
Session.UserId <> NullIdentifier() and Session.LocalUserName <> "" and Session.Password <> ""

A workaround is to logout from your ServiceCenter before going to the application or using a different browser.

João Rosado

Now is working perfectly after i've logged out from the ServiceCenter.
That behavior is a bug? or is correct?

Thanks João!
It's a bug in the 7.0 version of the component. It's already fixed on the 8.0 version.

The fix is the change I said on my previous post. You can make the change in the eSpace to fix it.
how does this work when using lifetime?
do we need to have the factory working only on development?


It it not currently integrated with lifetime, so the configurations are not "staged".
They need to be applied on each environment.

João Rosado
grmbl, thanks for the answer.

I am struggling how to read a section within outsystems.

just a simple key-value.
a simple extension seems not working..

What are you trying to read? A setting?

Here is a little snippet I did recently to read a setting that is set at the web.config level:

String value = System.Configuration.ConfigurationManager.AppSettings["mySettingName"];

(requires System.Configuration reference in the project)

João Rosado

made a silly mistake in outsystems-code..

now on towards the most fun stuff.
I have espace "Blob" with a public action that calls a webservice with that specific setting.
Now espace FrontEnd need to use that action, but now I have to add the setting also in the frontend web.config...

this means, that I have to have that setting in every espace/app that uses that blob-espace-action.

regarding the deployment again.

I understand we need to have the shared config to be added manually on each environment.
but after that, when deploying lifetime, the shared config will be added ?