How to add some settings to web.Config?

How to add some settings to web.Config?

  

Hello

We need to add a few web.Config app setings, running in OutSystems 10, which we need for a third party dll in an integration services (.NET) extension that should be able to read those config settings.

How can we achieve this, persistent over new deployments (with different setting values on different dev-test-acc-prod environments)?

Thanks

Ahron de Leeuw wrote:

Hello

We need to add a few web.Config app setings, running in OutSystems 10, which we need for a third party dll in an integration services (.NET) extension that should be able to read those config settings.

How can we achieve this, persistent over new deployments (with different setting values on different dev-test-acc-prod environments)?

Thanks

Hi,

If you are using an on-premises server, you should check the Factory Configuration component in Forge.

With this component, you are able to change the web.config for your applications that are calling those third-party services. 

You can create different configurations and associate them with different eSpaces. These configurations can be different in each environment (e.g. using different endpoints in DEV and PROD).

I've used this component to specify endpoints for services that were being called in .Net extensions.

Note: After changing a configuration or associating it to an eSpace you need to publish that eSpace for the web.config file to be updated.


Thank you very much, we are on-premise indeed and we will try this approach.

João Mateus wrote:

Ahron de Leeuw wrote:

Hello

We need to add a few web.Config app setings, running in OutSystems 10, which we need for a third party dll in an integration services (.NET) extension that should be able to read those config settings.

How can we achieve this, persistent over new deployments (with different setting values on different dev-test-acc-prod environments)?

Thanks

Hi,

If you are using an on-premises server, you should check the Factory Configuration component in Forge.

With this component, you are able to change the web.config for your applications that are calling those third-party services. 

You can create different configurations and associate them with different eSpaces. These configurations can be different in each environment (e.g. using different endpoints in DEV and PROD).

I've used this component to specify endpoints for services that were being called in .Net extensions.

Note: After changing a configuration or associating it to an eSpace you need to publish that eSpace for the web.config file to be updated.


Hi,

Could you maybe explain how you've used Factory Configuration to specify endpoints for services that were being called in .Net extensions?

We've come across this exact same situation were we call a Document Management service from our .Net extension, but seems to only work in our DEV environment. In every other environment we deploy our extension to it give us the following error:


Could not find default endpoint element that references contract 'DMServerService.IWorkflowService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.


Thanks!

Hi Nordin, we did not yet complete this approach (as for the time being we use another component without config requirements). So I hope Joao Mateus can answer your question. 

As for what I have seen Factory Configuration allows you to modify the standard OS generated web.Config using XLST transformation, which is rather cumbersome without XLST experience. Some examples are given in the component as to how modify config entries, but not how to ADD NEW entries. (An example of that would be useful).
Alternatively I thought it might be an option to integrate your own (separate) app.Config in the  OS web.config by using Factory Configuration to add something like <appSettings configSource="...\myAppSettings.config"/> to the OS web.Config, though the relative path should be figured out (I think your dlls are deployed in a different bin2 folder) and I doubt whether OutSystems deploys any of your own app.Config files at all (should be checked out on webserver first).

This post is similar to an issue I am facing. 

Does it mean if we are not using an on-premises server (E.g. the server is provided by Outsystems), there is no solution for us to include any third party endpoint in the application config file ? 

Currently, I am working on an extension which connects to SSRS SOAP server (SQL Server Reporting Service). 

Although I have included the app.config file during the deployment, I still got the following error.