# Elastic APM in ASP.NET Framework Configuration

**URL:** <https://discuss.elastic.co/t/elastic-apm-in-asp-net-framework-configuration/262674>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [January 29, 2021, 5:24pm UTC](https://discuss.elastic.co/t/elastic-apm-in-asp-net-framework-configuration/262674 "2021-01-29T17:24:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KonfuPanda](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@KonfuPanda](https://discuss.elastic.co/u/KonfuPanda)\
**Post date:** [January 29, 2021, 5:24pm UTC](https://discuss.elastic.co/t/elastic-apm-in-asp-net-framework-configuration/262674/1 "2021-01-29T17:24:21Z")

</div>

How can I change the configuration values programmtically/change them at runtime, e.g.:

Instead of setting in the Web.config in node the environment like this:  
`<add key="ElasticApm:Environment" value="MYENV" />`  
I want something like this in the Web.config:

```auto
<add key="Apm.Environment.Test" value="TEST-ENV" />
<add key="Apm.Environment.Int" value="INT-ENV" />
<add key="Apm.Environment.Prod" value="PROD-ENV" />

```

and then I would change the value based on the environment which in return I can read out on the host based on an already existing environmental variable.  
Is this somehow possible?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2021, 1:24pm UTC](https://discuss.elastic.co/t/elastic-apm-in-asp-net-framework-configuration/262674/2 "2021-02-19T13:24:25Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
